This commit is contained in:
Timo Hocker 2020-04-23 17:58:04 +02:00
parent 8bc26b384e
commit 17bf48d7cc
2 changed files with 12 additions and 2 deletions

View File

@ -58,4 +58,7 @@ const tsconfig = `{
}
`;
export { eslintrc, gitignore, npmrc, tsconfig, eslintrc_ts };
const eslintignore_ts = `/dist/
`;
export { eslintrc, gitignore, npmrc, tsconfig, eslintrc_ts, eslintignore_ts };

View File

@ -10,7 +10,10 @@ import { Input, Confirm } from 'enquirer';
import { Snippet } from '../../Snippet';
import { apply_template, modify_json, run_command } from '../../Helper';
import { eslintrc, gitignore, npmrc, tsconfig, eslintrc_ts } from './Assets';
import {
eslintrc, gitignore, npmrc,
tsconfig, eslintrc_ts, eslintignore_ts
} from './Assets';
export default class Node implements Snippet {
public async start (): Promise<void> {
@ -30,6 +33,10 @@ export default class Node implements Snippet {
await apply_template (gitignore, path.join (folder, '.gitignore'));
if (use_ts) {
await apply_template (tsconfig, path.join (folder, 'tsconfig.json'));
await apply_template (
eslintignore_ts,
path.join (folder, '.eslintignore')
);
await apply_template (
eslintrc_ts,
path.join (folder, 'lib', '.eslintrc.js')