quantumsheep / myges-cli

CLI for MyGES
MIT License
28 stars 4 forks source link

Unecessary files in package #6

Closed aminnairi closed 3 years ago

aminnairi commented 3 years ago

Issue

Some files are not ignored when packed before being pushed to NPM packages registry.

GitHub Action workflow files and sources should not be packed and take an unecessary amount of space in the tarball and when downloaded in the client's filesystem.

Reproduction steps

$ npm pack --dry-run

Additional Context

Adding the following line in the package.json file reduce the tarball size from 17.4Kb down to 9.9Kb.

{
  "files": ["dist"]
}

Also consider adding an optimization step with rollup and rollup-plugin-terser for instance to remove unecessary blank spaces in the transpiled files to save theoretically more than 50% added space in the packed tarball.

quantumsheep commented 3 years ago

Thanks you for telling me about rollup! Package started at 17.8kB, ended up at 6.4kB in https://github.com/quantumsheep/myges-cli/commit/7fdadb6103a3a28797c87d80ec9fbbba277c8b61 8.4kB in https://github.com/quantumsheep/myges-cli/commit/cde1ada4d0738b25ef3b5b3d2f933d30ab210463.