Personal flavor of js build script
Not crazy about the build frameworks
watchify + babelify + envify + browserify-versionify + txtify2 + brfs
As a standalone executable:
$ build-js
Watch:
$ build-js --watch
Use env vars to change the default entry point / destination / extensions:
$ JS_SRC=index.js JS_DEST=public/build.js JS_EXTENSIONS='html,txt' build-js
As a JavaScript library:
var Builder = require('build-js')
// env vars are respected, but you can override them:
var b = new Builder({
src: 'index.js',
dest: 'public/build.js',
extensions: [ 'html', 'txt' ]
})
b['build' || 'watch'](function (err) {
if (err) console.error(err.message)
else console.log('js built successfully')
})
$ npm install jessetane/build-js#1.0.0
$ npm run test
MIT