igroot-builder
Version:
白山——zeus系统前端打包工具
28 lines (23 loc) • 675 B
JavaScript
const fs = require('fs')
const path = require('path')
const chalk = require('chalk')
const bsyPath = path.join(process.cwd(), 'bsy.json')
const exist = fs.existsSync(bsyPath)
if (!exist) {
console.error(chalk.red('Can not find the \'bsy.json!\''))
console.info(chalk.yellow('Please execute in the project root directory.\n'))
throw new Error('Can not find the \'bsy.json!\'')
}
const bsy = require(bsyPath)
const defaultOptions = {
homepage: 'index',
port: 3000,
host: '0.0.0.0',
domain: 'localhost',
publicPath: './',
buildPath: './dist',
esModule: [],
useAntd: false
}
bsy.options = Object.assign(defaultOptions, bsy.options)
module.exports = bsy