diff --git a/README.adoc b/README.adoc index 7e5ee2754..8089b6172 100644 --- a/README.adoc +++ b/README.adoc @@ -50,38 +50,91 @@ docker-compose up For detailed information on building and running Planner see link:docs/building_planner.adoc[Building the Planner Component Library] documentation. -== Other Useful Scripts and Tasks +== Useful Scripts and Tasks -The Planner uses `gulp` as the build tool and provides frequently used tasks like `npm` tasks as well. -The `scripts` section of the link:package.json [*_package.json_*] file lists all the tasks available. +The Planner delegates task running to `gulp` and allows parametric subtasks in the format of `npm run \-- --subtask` which translates into `gulp --subtask` which is then can be executed. -The following table lists some of the most useful or frequently used scripts and `gulp` tasks you may need to run: +The `scripts` section of the link:package.json[*_package.json_*] file lists the main tasks i.e. `build`, `clean` & `test`. Following table lists the available npm scripts managed with `gulp` tasks, but to understand the routines triggered by the subtask parameters, please check out the link:gulpfile.js[*_gulpfile_*]: -[cols="1,2,4", options="header"] +[cols="1,1,3,4a", options="header"] |=== -|Script +|Task +|Subtask |Command |Description -|Clean -|`$ npm run clean -- --all` -|Cleans the project directory +.6+| Build -|Reinstall -|`$ npm run reinstall` -|Cleans the dependencies and reinstalls them +| *[default]* app +v|`npm run build` or +`npm run build \-- --app` +| Builds the planner library -|Unit Tests -|`$ npm run tests -- --unit` -|Runs the unit tests +| [line-through]#image# +v|`npm run build \-- --image` +| Creates container image for the app -|Semantic Release -|`$ npm run semantic-release` -|Builds the library and performs a semantic release to npmjs +| release +v|`npm run build \-- --release` +| Publishes the library to `*npm*` registry + +| [line-through]#tarball# +v|`npm run build \-- --tarball` +| Packs the library into a tarball + +| [line-through]#validate# +v|`npm run build \-- --validate` +| Dry runs the build for validation + +| watch +v|`npm run build \-- --watch` +| Rebuilds planner library on file changes + + +.7+| Clean + +| *[default]* all +v|`npm run clean` or +`npm run build \-- --app` +| Fully resets the project + +| cache +v|`npm run clean \-- --cache` +| Clears `*npm*` cache + +| config +v|`npm run clean \-- --config` +| Resets app config & env_vars + +| dist +v|`npm run clean \-- --dist` +| Removes the build artifacts + +| images +v|`npm run clean \-- --images` +| Stops containers & removes the images + +| modules +v|`npm run clean \-- --modules` +| Removes all `*node*` modules + +| temp +v|`npm run clean \-- --temp` +| Removes temp files and artifacts + + +.2+| Tests + +| unit +v|`npm run tests \-- --unit` +| Runs the unit tests + +| [line-through]#func# +v|`npm run tests \-- --func` +| Runs the functional tests + +4+| Commands with [line-through]#strikethroughs# aren't yet implemented. -|Continuous Build -|`$ npm run build -- --watch` -|Runs the build in watch mode, watches for changes and rebuilds source |=== == Documentation diff --git a/gulpfile.js b/gulpfile.js index 529251f79..b5371764f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -117,6 +117,9 @@ gulp.task('build', function () { // image // release + if (argv.release) { + proc.exec('node_modules/.bin/semantic-release'); + } // tarball diff --git a/package.json b/package.json index 199b55ce9..5f4a2eda5 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "scripts": { "build": "gulp build", "clean": "gulp clean", - "setup": "gulp setup", "tests": "gulp tests" }, "license": "Apache-2.0", @@ -181,7 +180,7 @@ "rimraf": "2.6.2", "run-sequence": "2.2.0", "script-ext-html-webpack-plugin": "1.8.7", - "semantic-release": "8.2.0", + "semantic-release": "12.2.2", "style-loader": "0.19.0", "systemjs": "0.20.19", "to-string-loader": "1.1.5",