it('should have correct info', function (done) { chron('default', chron .source('./src/main.js', 'testing.js') .dest('static'), function (t) { assert.equal(t.files[0], './src/main.js'); assert.equal(t.path, 'static'); var b = browserify({ entries: [t.files[0]], cache: {}, packageCache: {}, transform: [ babelify, lrload ], debug: t.params.d || t.params.debug, bundleExternal: false }) var name = t.files[1] || 'bundle.js'; assert.equal(name, 'testing.js'); assert.equal(t.path + '/' + name, 'static/testing.js') t.pump(b.bundle(), t.source(name), t.dest(), function (err) { if (err) throw err; t.done(err) done(err); }) } ).run() })
describe('default', function () { chron('default', function (t) { console.log('hello'); t.done() }); it('should run default', function () {}); })
var chron = require('chronic'); var lrload = require('./'); var opn = require('opn'); chron('default', chron .source('./src/main.js') .dest('static'), lrload ) chron('serve', function (t) { require('./server') var port = process.env.PORT || 3000; if (t.params.o || t.params.open) { opn(`http://localhost:${port}`) } })