|
@ -7,6 +7,7 @@ |
|
|
const path = require('path'); |
|
|
const path = require('path'); |
|
|
/*这种以CommonJS的同步形式去引入其它模块的方式代码更加简洁:获取组件*/ |
|
|
/*这种以CommonJS的同步形式去引入其它模块的方式代码更加简洁:获取组件*/ |
|
|
const os = require('os'); |
|
|
const os = require('os'); |
|
|
|
|
|
const fs = require('fs') |
|
|
const moment = require('moment'); |
|
|
const moment = require('moment'); |
|
|
const args = require('args'); |
|
|
const args = require('args'); |
|
|
const dev = process.env.NODE_ENV == 'development'; |
|
|
const dev = process.env.NODE_ENV == 'development'; |
|
@ -126,6 +127,11 @@ if (product.frontParams) { |
|
|
process.exit(-1); |
|
|
process.exit(-1); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
let env = [] |
|
|
|
|
|
for (let k in product.frontParams) { |
|
|
|
|
|
env.push(`window.${k} = '${product.frontParams[k]}'`) |
|
|
|
|
|
} |
|
|
|
|
|
fs.writeFileSync('./client/assets/env.js', env.join(';')) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
let config; |
|
|
let config; |
|
|