Add txt file definiton

This commit is contained in:
Dragon Fire
2021-04-23 21:25:26 -04:00
parent 634e4daf90
commit d90160c926
2 changed files with 10 additions and 1 deletions
+4
View File
@@ -0,0 +1,4 @@
Text File
filter remove_matches .*
extension txt
3rd_gen_scale 1.00
+6 -1
View File
@@ -37,7 +37,12 @@ module.exports = class ClocCommand extends Command {
if (this.cache) return this.cache;
const { stdout, stderr } = await exec(
path.join(__dirname, '..', '..', 'node_modules', '.bin', 'cloc'),
['--json', '--exclude-dir=node_modules', path.join(__dirname, '..', '..')]
[
'--json',
'--exclude-dir=node_modules',
`--read-lang-def=${path.join(__dirname, '..', '..', 'assets', 'txt', 'txt_definition.txt')}`,
path.join(__dirname, '..', '..')
]
);
if (stderr) throw new Error(stderr.trim());
this.cache = JSON.parse(stdout.trim());