banger v0.0.15
Gulp-Based Build System
This project uses Gulp to build NodeJS based apps.
Purpose
The basic tenet of this project is to provide a life-cycle base build system to automate NodeJS application(s). The life-cycle provide points we can attach tasks to. This provides the ability to provide an extensible base of tasks to build any application.
Life-cycle
Each life-cycle is made up of phases, each depending on the previous in the chain to have executed. You attach tasks to a phase for it to be run. Each task associated with a phase is run in parallel.
IMPORTANT: A task must have no dependency other than the phase.
There are in fact multiple life-cycles, Clean and Default.
Name | Description |
---|---|
pre-clean | execute processes needed prior to the actual project cleaning |
clean | remove all files generated by the previous build |
post-clean | execute processes needed to finalize the project cleaning |
Default Lifecycle
Name | Description |
---|---|
validate | validate the project is correct and all necessary information is available. |
initialize | initialize build state, e.g. set properties or create directories. |
resources | generate resources for inclusion in the package. |
compile | compile the source code of the project. |
test-compile | compile the test source code into the test destination directory |
test | run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed. |
dist | take the compiled code and package it in its distributable format, such as a JAR. |
Validate
The validate phase is where we check files:
- well-formed package.json
- lint code (JavaScript,TypeScript,SASS)
Initialize
Create directories and any other necessary project structure before project can be built.
Resources
Generate resources used by the project:
- image sprites
- source-maps
Compile
Compile the code (if necessary), for instance, if you are using TypeScript.
Compile Tests
Compile the code (if necessary), for instance, if you are using TypeScript.
Test
Run Unit Tests
Create Distribution
Generate the distribution.
Old Task Order
default: validate-package-json parallel: clean ts-lint check-js-style check-js-quality parallel: scripts-TypeScript scripts-JavaScript copy: parallel: styles-vendor-dist styles-dist scripts-JavaScript-dist html images
New task Order
clean
default: validate: package-json ts-lint js-lint sass-lint initialize: log resources: html images compile: ts-compile js-compile test: unit-test dist: styles-vendor styles-app js
Release Process
- commit all changes to include in the release
- edit the version in package.json (respect semver)
- update CHANGELOG.MD
- commit
- git tag <version>
- git push --tags
- draft the release on GitHub (add description, etc)
- npm publish
Authors
Mark Small
License
This project and all associated source code is licensed under the terms of the MIT License.