[DAEMON-39] appcd: Create 'package' task for top-level gulp file
|Fix Version/s||Appc Daemon 1.0.0|
DescriptionThe 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.jsonfiles 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.
- Chris Barber 2017-02-14
Wrote a quick test and the results are very positive. By consolidating all of the
node_modulesacross 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.
- Chris Barber 2017-02-15
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.
- Chris Barber 2017-02-23 Latest package stats: |Tarball|137KB| |Extracted, before npm install|580KB| |Extracted, after npm install|31MB| |Node modules|218|