diff --git a/.npmignore b/.npmignore index c42f7635..5305768b 100644 --- a/.npmignore +++ b/.npmignore @@ -3,10 +3,15 @@ /* # Except this files/folders !.editorconfig +!.gitignore +!.npmignore +!docs +!lib !LICENSE !package.json !package-lock.json !README.md !scripts +!templates !tsconfig.json !tslint.json diff --git a/src/configuration.ts b/src/configuration.ts index 4e1b8dd5..a4f7ca71 100644 --- a/src/configuration.ts +++ b/src/configuration.ts @@ -6,7 +6,7 @@ import {join} from 'path'; export const NEEDED_FILES = [ '.editorconfig', '.gitignore', - '.npmignore', + join('templates', '.npmignore'), join('templates', 'tsconfig.json'), join('templates', 'tslint.json'), ]; diff --git a/templates/.npmignore b/templates/.npmignore new file mode 100644 index 00000000..5132c90c --- /dev/null +++ b/templates/.npmignore @@ -0,0 +1,12 @@ +# Ignore all files/folders by default +# See https://stackoverflow.com/a/29932318 +/* +# Except this files/folders +!docs +!lib +!LICENSE +!package.json +!package-lock.json +!README.md +!tsconfig.json +!tslint.json