surfacecurve_module
A module intended to provide simple, standardized defaults for building, testing, benchmarking, and publishing a surfacecurve module.
Usage
In the source package, install surfacecurve_module as a dependency:
npm install --save surfacecurve_module
Then create a shortcut script to enable convenient default behaviors. Create the following as a file named scm
in the root directory of the package:
In the file scm
:
require("surfacecurve_module").main();
This node allows the following commands to be run in the source package by providing reasonable defaults:
node scm build
node scm test
node scm publish
Details
node scm build
Assumes the package is intended for distribution both as a command-line and browser-based package. Uses browserify and uglify-js to create a browser-compatible file in the dist
package.
node scm test
Assumes a suite of mocha tests is used in the source package. Will run a set of standard tests on the package structure, then will execute mocha
on source package's test
subdirectory.
node scm publish
Automates the node scm build
, node scm test
, git commit
, git tag
, npm publish
, and version number bump of the source package.