Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -69,6 +73,7 @@ File suffixes supported are ..
- .svg
- .swift
- .ts
- .tsx
- .vb
- .xml
- .yaml
Expand Down
5 changes: 5 additions & 0 deletions lib/line-count.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ suffixes = [
"svg"
"swift"
"ts"
"tsx"
"ttslua"
"vb"
"vue"
Expand Down Expand Up @@ -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
Expand Down