Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Add an .npmignore to all packages #291

Merged
merged 1 commit into from
Jun 29, 2017
Merged

Add an .npmignore to all packages #291

merged 1 commit into from
Jun 29, 2017

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Jun 29, 2017

Excluding the test directory and yarn.lock reduces the package size significantly (for example 85-90% reduction in both compressed and uncompressed size of neutrino-preset-web), plus reduces the noise when consumers need to grep their local node_modules.

An .npmignore has been used instead of the files directive in package.json since the latter can cause breakage that isn't shown in CI if the directory layout changes (which is likely given the Neutrino packages have a mixture of using the src directory and not, depending on how many files they include).

.npmignore was used instead of .yarnignore since npm doesn't support the latter whereas yarn supports both.

Fixes #289.

Excluding the test directory and `yarn.lock` reduces the package
size significantly (for example 85-90% reduction in both compressed
and uncompressed size of neutrino-preset-web), plus reduces the
noise when consumers need to grep their local `node_modules`.

An `.npmignore` has been used instead of the `files` directive in
`package.json` since the latter can cause breakage that isn't shown
in CI if the directory layout changes (which is likely given the
Neutrino packages have a mixture of using the `src` directory and
not, depending on how many files they include). `.npmignore` was
used instead of `.yarnignore` since npm doesn't support the latter
whereas yarn supports both.
@edmorley edmorley self-assigned this Jun 29, 2017
@eliperelman
Copy link
Member

Wow, that much of a reduction?! 😮

@edmorley
Copy link
Member Author

Yeah - yarn.lock is quite big in comparison to the actual middleware/presets!

@eliperelman eliperelman merged commit ac0fd0d into neutrinojs:master Jun 29, 2017
@edmorley edmorley deleted the npmignore branch June 29, 2017 17:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants