mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Add txt file definiton
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
Text File
|
||||
filter remove_matches .*
|
||||
extension txt
|
||||
3rd_gen_scale 1.00
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user