Closed cqliu1 closed 6 years ago
For reference: https://docs.npmjs.com/files/package.json#files
There's no value in publishing docs, tests, build files, etc. on npm. In the case of this module, even the src
isn't required. Adding this to the package.json
will remove the cruft from the published module on npm.
"files": ["lib"],
The published module will then be the package.json file, the readme, the license, and the built code.
the following files will be published:
package.json
README.md
LICENSE
lib/tinymath.js
lib/tinymath.min.js
lib/tinymath.js.map
Publishing src
and using jsnext:main
allows eslint-plugin-import to verify named imports, which I am a huge fan of 😄
I'm pretty sure jsnext:main
was deprecated in favor of module
. They seem to be used pretty interchangeably in the associated tooling though. Rollup docs reference.
But, I get your point. Open another issue, I'm not opposed to putting src
back into the published package.
@w33ble suggested that we remove the docs and src folder from the published version of TinyMath. He also said to add the lib folder to the .gitignore.