It is not required, but this app has a
config.js file to indicate where js and css bundles, static assets, mocha tests, server code, and handlebars templates are. Also included is a service worker config. The gulp pipeline optionally takes a workbox service worker and bundles it into the distribution directory.
The first requirement of the bundles is to include a
bundleDir in your
config.js, however if not provided, it will default to "public".
Bundles as a whole are considered interfaces and should implement a few basic things to be functional. There are three types of bundles
config.js file should export those three properties. However, it is entirely possible that an app could be built without any extra js or css, using only what is bundled in the dependencies (bootstrap and a few others) with some handlebars.
|Bundle Property||Type||Description||Default value||Example Value|
||Name of the bundle. This gets transformed into a
||The globs/paths for source files in the bundle.||
||Context directory to put the bundle in within the
||JS bundle property to allow babel transpilation on assets.||
||JS and CSS bundle property to allow sourcemaps in bundle write. Additionally, sourcemaps will only be written if environment variable
||JS and CSS bundle property to allow minify of assets.||
This project is heavily dependent on gulp@^4.0.0. You can get a list of top level tasks with
npx gulp --tasks, but many build tasks are generated on the fly because of how configurable the stack is. For more info check out the configuration section.
The app is ultimately just a node script, so it can be started by running node on the
package.json main file. This particular app starts up express on port 3000.