'add seafile-ignore.txt to every git repo'
This commit is contained in:
@@ -19,6 +19,7 @@ module.exports = {
|
||||
'./envar-base-secret.js',
|
||||
'./envar-base-secret.gitignore.js',
|
||||
],
|
||||
withCmd = false,
|
||||
} = {}) {
|
||||
if (!global.envar) {
|
||||
global.envar = rawEnvar // 不知为何,必须定义成全局变量,才能保证多次require只执行一次。
|
||||
@@ -51,7 +52,7 @@ module.exports = {
|
||||
console.warn(` - unrecognized envarFiles!`)
|
||||
}
|
||||
|
||||
try {
|
||||
if (withCmd) {
|
||||
const commander = require('commander')
|
||||
if (Array.isArray(global.envar.commanderOptions)) {
|
||||
console.info('- Loading Command Line Parameters (载入命令行参数)')
|
||||
@@ -70,8 +71,6 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(' - commander not available!')
|
||||
}
|
||||
|
||||
console.log(`>>>>>>>> Configured [${process.env.NODE_ENV}] Environment >>>>>>>>`)
|
||||
|
||||
Reference in New Issue
Block a user