From 17bf48d7cc4dec29340c393ce3b843bf819f468e Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Thu, 23 Apr 2020 17:58:04 +0200 Subject: [PATCH] fix --- lib/snippets/node/Assets.ts | 5 ++++- lib/snippets/node/index.ts | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/snippets/node/Assets.ts b/lib/snippets/node/Assets.ts index 3082501..3f15333 100644 --- a/lib/snippets/node/Assets.ts +++ b/lib/snippets/node/Assets.ts @@ -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 }; diff --git a/lib/snippets/node/index.ts b/lib/snippets/node/index.ts index ed096f4..cb7a65e 100644 --- a/lib/snippets/node/index.ts +++ b/lib/snippets/node/index.ts @@ -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 { @@ -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')