chore(npmignore): Cleanup list of assets included in the released npm package #1942
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR rewrites the .npmignore file to ensure that only the files needed in the released package are actually included.
The current .npmignore looks pretty outdated and so the package released on npm contains a long list of files that are not really of any use when the package is installed from a regular user, as it can be checked by looking at the following unpkg url: https://unpkg.com/addons-linter@0.41.0/
I propose to reverse the way we list the globs in the npmignore, so that we exclude everything by default, and then we just list all the globs related to the files that we actually want to be included in the released npm package.
(To be fair, I think that most of the files in
bin/
, besides the addons-linter one, should be moved in a separate directory, because they are not bin scripts of the package, but just "internal" nodejs utilities that we use from time to time during the development activities, e.g. to import a new version of the API schema files, manage the locales extraction and generation etc.).