Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
chore(release): update docs to reflect new scripts and use semantic r…
Browse files Browse the repository at this point in the history
…elease

- Update semantic release to newer BREAKING version
- Remove setup script for now
- Add semantic release as part of build scripts (--release flag)
- Update readme to document all the BREAKING script changes
  • Loading branch information
debloper committed Jan 16, 2018
1 parent 1be5892 commit ebb39f9
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 23 deletions.
95 changes: 74 additions & 21 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <task> \-- --subtask` which translates into `gulp <task> --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
Expand Down
3 changes: 3 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ gulp.task('build', function () {
// image

// release
if (argv.release) {
proc.exec('node_modules/.bin/semantic-release');
}

// tarball

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"scripts": {
"build": "gulp build",
"clean": "gulp clean",
"setup": "gulp setup",
"tests": "gulp tests"
},
"license": "Apache-2.0",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit ebb39f9

Please sign in to comment.