|
|
@ -19,7 +19,7 @@ args.option('qnak', 'qiniuAccessKey'); |
|
|
|
args.option('qnsk', 'qiniuSecretKey'); |
|
|
|
args.option('qnbkt', 'qiniuBucket'); |
|
|
|
args.option('qndmn', 'qiniuDomain'); |
|
|
|
const flags = args.parse(process.argv); |
|
|
|
const flags = dev ? args.parse(process.argv) : {}; |
|
|
|
|
|
|
|
const FS_UNIAPP_API = process.env.FS_UNIAPP_API || flags.apiUrl; |
|
|
|
|
|
|
@ -45,7 +45,7 @@ if ( |
|
|
|
args.showHelp(); |
|
|
|
process.exit(-1); |
|
|
|
} |
|
|
|
console.log(1,); |
|
|
|
|
|
|
|
const product = { |
|
|
|
port: flags.port || 8080, |
|
|
|
staticDirs: [path.join(__dirname, './client')], |
|
|
@ -115,10 +115,9 @@ const product = { |
|
|
|
maxRetries: 1 |
|
|
|
} |
|
|
|
}; |
|
|
|
console.log(2, product); |
|
|
|
|
|
|
|
let config; |
|
|
|
if (dev) { |
|
|
|
console.log(2.1); |
|
|
|
config = { |
|
|
|
port: product.port, |
|
|
|
staticDirs: product.staticDirs, |
|
|
@ -138,5 +137,4 @@ if (dev) { |
|
|
|
config = product; |
|
|
|
} |
|
|
|
|
|
|
|
console.log(3, config); |
|
|
|
module.exports = config;//区分开发和发布
|