JavaScript code bricks package helpers as a npm module.
Used in js-algo, js-data-structures and all their subpackages to handle building and testing.
Use together with sak to get automated package creation as well as duo, component, bower, and npm registration and releases.
To run the following command you must:
The following command will:
js-<namespace> in the current working
directory;js-<namespace> on github.com for <username>;https://<username>@github.com/<username>/js-<namespace>
as its origin remote;npm run doc command
using groc;README.md with badges;pkg.json, a package.json, a bower.json and a component.json;<username>-js-<namespace> on npm and bower.After running the command you will have to:
The sak $ command to run is:
$ codebricks new <namespace> <description> --keywords <keyword>* --username <username> --ci Or the shortened version of it:
$ cdb n <namespace> <description> -k <keyword>* -u <username> -c Note that --ci travis-ci is the default. --keywords can be left empty.
If --username is not given then either sak
can find it in your ~/.sak config file or will prompt for it.
Release a major version for duo, component, bower, and npm:
$ npm release majorRelease a minor version for duo, component, bower, and npm:
$ npm release minorRelease a patch version for duo, component, bower, and npm:
$ npm release patchRelease version <semver> for duo,
component,
bower, and npm:
$ npm release <semver>Note that $ npm release <...> can be shortened to $ npm r <...>.
Running the package creation command explained earlier will install
aureooms-node-package as a development dependency of your package. This is
equivalent to running:
npm install --save-dev aureooms-node-packageThis will give your project access to tree runnables located in
node_modules/.bin. The package creation command will add these scripts to
your package.json:
..."scripts": ,...It will also create a pkg.json file, assuming your code tree is located in
js/src and your testing index.js is located in test/js:
Running npm run build will parse your code tree recursively and in
lexicographical order, concatenating all the files it encounters in
js/dist/<namespace>.js and minify this file to js/dist/<namespace>.min.js.
Running npm run doc will generate the documentation using
groc and publish it on
github.com (gh-pages branch). Before running this command you must make
sure to have committed all your local changes.
Running npm run test will test the main code file using the test code
referenced by test/js/index.js.