Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the number of files published to npm for a plugin #204

Open
chasenlehara opened this issue Feb 23, 2017 · 2 comments
Open

Reduce the number of files published to npm for a plugin #204

chasenlehara opened this issue Feb 23, 2017 · 2 comments

Comments

@chasenlehara
Copy link
Member

I believe the following files & folders can be removed when a plugin is published to npm:

  • .editorconfig
  • .jshintrc
  • .npmignore
  • .travis.yml
  • build.js
  • documentjs.json
  • test

Here’s the file where these can be added: https://github.com/donejs/generator-donejs/blob/a50d2851bf788ec11473b49e9c8b46a1eff4bd82/plugin/templates/static/.npmignore

@andrejewski
Copy link
Contributor

Some popular projects use the package.json "files" field instead. We can get rid of the .npmignore and use:

{
  "files": ["src", "dist"] // to only include the code
}

I also looked up some discussion on tests and documentation and whether to exclude them. The consensus seems to lean towards being as lean as possible.

@chasenlehara
Copy link
Member Author

After reading the docs on files and npmignore, I think it’d be better for us to have a whitelist of files to publish rather than a blacklist of files to exclude.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants