diff --git a/README.md b/README.md index cda80eb..19b4e05 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # line-count package +### Description + +Fork of Towtow10's line-count atom package with support for `.tsx` file suffix. + ### Usage Press ctrl-alt-shift-L (line-count:open) to open an editor page showing line counts broken down by file, directory, and file type for all files in the project. @@ -69,6 +73,7 @@ File suffixes supported are .. - .svg - .swift - .ts +- .tsx - .vb - .xml - .yaml diff --git a/lib/line-count.coffee b/lib/line-count.coffee index 85bf0ee..b486def 100644 --- a/lib/line-count.coffee +++ b/lib/line-count.coffee @@ -68,6 +68,7 @@ suffixes = [ "svg" "swift" "ts" + "tsx" "ttslua" "vb" "vue" @@ -150,6 +151,10 @@ module.exports = if type == 'ttslua' type = 'lua' + #treat tsx as ts + if type == 'tsx' + type = 'ts' + try counts = sloc code, type catch e