tsc on test when typescript on

This commit is contained in:
Timo Hocker 2020-04-26 11:57:32 +02:00
parent a6e607334c
commit cd7c757daf

View File

@ -56,8 +56,10 @@ export default class Node implements Snippet {
lint: 'eslint . --ext .js,.jsx,.ts,.tsx,.vue,.mjs', lint: 'eslint . --ext .js,.jsx,.ts,.tsx,.vue,.mjs',
test: 'nyc ava' test: 'nyc ava'
}; };
if (use_ts) if (use_ts) {
(obj.scripts as Record<string, unknown>).compile = 'tsc'; (obj.scripts as Record<string, unknown>).compile = 'tsc';
(obj.scripts as Record<string, unknown>).test = 'tsc && nyc ava';
}
return obj; return obj;
}, path.join (folder, 'package.json')); }, path.join (folder, 'package.json'));
} }