linguist-js
Advanced tools
Comparing version 1.5.3 to 1.5.4
@@ -15,10 +15,11 @@ "use strict"; | ||
.option('-i|--ignore <files...>', `A list of file path globs to ignore`) | ||
.option('-f|--files|--full', 'List every file parsed', false) | ||
.option('-s|--summary', 'Show output in a human-readable format', false) | ||
.option('-q|--quick', 'Skip checking of gitattributes/gitignore files (alias for -AIHS=false)', false) | ||
.option('-V|--keepVendored', 'Prevent skipping over vendored/generated files', false) | ||
.option('-A|--checkAttributes', 'Force the checking of gitattributes files (default: true unless --quick is set)') | ||
.option('-I|--checkIgnored', 'Force the checking of gitignore files (default: true unless --quick is set)') | ||
.option('-H|--checkHeuristics', 'Apply heuristics to ambiguous languages (default: true unless --quick is set)') | ||
.option('-S|--checkShebang|--checkHashbang', 'Check shebang lines for explicit classification (default: true unless --quick is set)') | ||
.option('-f|--files|--full [bool]', 'List every file parsed', false) | ||
.option('-s|--summary [bool]', 'Show output in a human-readable format', false) | ||
.option('-q|--quick [bool]', 'Skip checking of gitattributes/gitignore files (alias for -AIHS=false)', false) | ||
.option('-V|--keepVendored [bool]', 'Prevent skipping over vendored/generated files', false) | ||
.option('-B|--keepBinary [bool]', 'Prevent skipping over binary files', false) | ||
.option('-A|--checkAttributes [bool]', 'Force the checking of gitattributes files (default: true unless --quick is set)', true) | ||
.option('-I|--checkIgnored [bool]', 'Force the checking of gitignore files (default: true unless --quick is set)', true) | ||
.option('-H|--checkHeuristics [bool]', 'Apply heuristics to ambiguous languages (default: true unless --quick is set)', true) | ||
.option('-S|--checkShebang|--checkHashbang [bool]', 'Check shebang lines for explicit classification (default: true unless --quick is set)', true) | ||
.helpOption(`-h|--help`, 'Display this help message') | ||
@@ -28,7 +29,14 @@ .version(VERSION, '-v|--version', 'Display the installed version of linguist-js'); | ||
const args = commander_1.program.opts(); | ||
for (const arg in args) { | ||
if (typeof args[arg] !== 'string') | ||
continue; | ||
args[arg] = args[arg].replace(/^=/, ''); | ||
if (args[arg].match(/true$|false$/)) | ||
args[arg] = args[arg] === 'true'; | ||
} | ||
if (args.analyze) { | ||
(async () => { | ||
const root = args.analyze === true ? '.' : args.analyze; | ||
if (typeof args.ignore === 'string') | ||
args.ignore = args.ignore.split(/(?<!\\)[:;|]/); | ||
if (args.ignore[0].match(/(?<!\\)[:;|]/)) | ||
args.ignore = args.ignore[0].split(/(?<!\\)[:;|]/); | ||
const { count, languages, results } = await index_1.default(root, args); | ||
@@ -35,0 +43,0 @@ if (args.summary) { |
{ | ||
"name": "linguist-js", | ||
"version": "1.5.3", | ||
"version": "1.5.4", | ||
"description": "Analyse languages used in a folder. Powered by GitHub Linguist, although it doesn't need to be installed.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25811
394