UNPKG

@northbrook/rollup

Version:
28 lines (18 loc) 924 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.plugin = undefined; var _os = require('os'); var _path = require('path'); var _northbrook = require('northbrook'); var _helpers = require('northbrook/helpers'); var plugin = exports.plugin = (0, _northbrook.command)((0, _northbrook.alias)('rollup'), (0, _northbrook.description)('rollup your packages')); (0, _northbrook.each)(plugin, function (ref, io) { var ref_pkg = ref.pkg; var path = ref_pkg.path; var name = ref_pkg.name; if (!(0, _helpers.isFile)((0, _path.join)(path, 'rollup.config.js'))) { return Promise.resolve(); } io.stdout.write("Running 'rollup -c' in " + name + "..." + _os.EOL + _os.EOL); return (0, _helpers.execute)('rollup', ['-c'], io, path).then(function () { return io.stdout.write("Completed bundling in " + name + _os.EOL + _os.EOL); }); }).catch(function () { return process.exit(1); });