You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, may I suggest adding the code snippet below to package.json, instead of using .npmignore for each package
"files": [
"lib"
],
This works by whitelisting only the transpiled code that will be published to NPM, it will also auto include necessary files such as package.json, README.md, so instead of blacklisting what should not be published, we allowed what should be published and shrink the NPM package size even more. Also, manually adding or removing files from being blacklisted in .npmignore can be tedious, as the project may grow larger because we only need the transpiled code, package.json and nothing else IMO
But that way the test codes will need to have its own folder instead of sharing same folder with source code, or alternatively automate the removal of test files from the transpiled code, I prefer the former approach
If this proposal is accepted, I will make a new PR
The text was updated successfully, but these errors were encountered:
Hi, may I suggest adding the code snippet below to
package.json
, instead of using.npmignore
for each packageThis works by whitelisting only the transpiled code that will be published to NPM, it will also auto include necessary files such as
package.json
,README.md
, so instead of blacklisting what should not be published, we allowed what should be published and shrink the NPM package size even more. Also, manually adding or removing files from being blacklisted in.npmignore
can be tedious, as the project may grow larger because we only need the transpiled code,package.json
and nothing else IMOBut that way the test codes will need to have its own folder instead of sharing same folder with source code, or alternatively automate the removal of test files from the transpiled code, I prefer the former approach
If this proposal is accepted, I will make a new PR
The text was updated successfully, but these errors were encountered: