UNPKG

cybertron-utils

Version:
20 lines (19 loc) 556 B
const omg = require('omg-rc-cli'); const getConfig = require('../omg.config'); const requireJS = require('../utils/require'); const mergeObject = require('../utils/merge'); let omgConfig = requireJS(process.cwd(), './omg.config.js'); module.exports = { command: 'publish', desc: '生成构建', async handler(argv) { if (typeof omgConfig === 'function') { omgConfig = omgConfig(); } let config = getConfig('publish'); mergeObject(config, omgConfig) config.env.cdn = 1; config.options.chunkhash = false; await omg.publish(config); } };