motion
Version:
motion - moving development forward
46 lines (28 loc) • 1.6 kB
JavaScript
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { var callNext = step.bind(null, 'next'); var callThrow = step.bind(null, 'throw'); function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(callNext, callThrow); } } callNext(); }); }; }
var _libFns = require('../lib/fns');
var _gulp = require('../gulp');
var _gulp2 = _interopRequireDefault(_gulp);
var _bundler = require('../bundler');
var _bundler2 = _interopRequireDefault(_bundler);
var _copy = require('./copy');
var _copy2 = _interopRequireDefault(_copy);
var _opts = require('../opts');
var _opts2 = _interopRequireDefault(_opts);
var _makeTemplate = require('./makeTemplate');
var _makeTemplate2 = _interopRequireDefault(_makeTemplate);
exports['default'] = _asyncToGenerator(function* () {
try {
print('\n Building...'.dim);
_makeTemplate2['default']();
yield Promise.all([_gulp2['default'].app(), _gulp2['default'].styles(), _copy2['default'].motion(), _copy2['default'].react()]);
print('\n Built! ⇢'.green.bold + (' cd ' + buildDir()));
} catch (e) {
_libFns.handleError(e);
}
});
function buildDir() {
return _libFns.path.relative(_opts2['default']('appDir'), _opts2['default']('buildDir'));
}
module.exports = exports['default'];