[DAEMON-39] appcd: Create 'package' task for top-level gulp file
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Critical |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2017-02-23T16:33:14.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Appc Daemon 1.0.0 |
Components | Tooling |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2017-02-14T04:04:30.000+0000 |
Updated | 2017-10-26T03:12:49.000+0000 |
Description
The appcd daemon is made up of the bootstrap, core, a bunch of micro packages, and a bunch of plugins. While each of these can be published individually to NPM, it might be better to generate a pseudo "appcd" package that combines all of the appcd-*
package.json
files together.
This would save hundreds of MB of hard drive space.
Furthermore, we may want to take it a step further and declare the bootstrap, core, micro packages, and plugins as "bundledDependencies" and include them in the package. This would allow us to only publish "appcd" to npm instead of dozens of modules every release. This would also make locking down versions much easier.
Wrote a quick test and the results are very positive. By consolidating all of the
node_modules
across all packages, the daemon *currently* only requires 27 dependencies totaling 26MB of space. The daemon has a ways to go, so the number of dependencies will go up, but all the more reason to pursue this.I implemented the rest of the 'package' task and it generates the tarball which is 88KB. That includes all the bootstrap, core, and micro-packages. It doesn't include plugins yet. It extracts to 524KB before installing NPM dependencies. After doing an
npm install
, the install size increases up to 27MB. This isn't terrible. NPM itself is 19MB. The Appc CLI "core" is a whopping 286MB. Obviously we can expect the daemon to grow in size, but will most certainly be less than the Appc CLI's install size.Latest package stats: |Tarball|137KB| |Extracted, before npm install|580KB| |Extracted, after npm install|31MB| |Node modules|218|