Comparing version 0.26.0 to 0.27.0
@@ -54,2 +54,3 @@ import _defineProperty from 'babel-runtime/helpers/defineProperty'; | ||
appName = _tool$options.appName, | ||
configFolder = _tool$options.configFolder, | ||
pluginAlias = _tool$options.pluginAlias, | ||
@@ -72,5 +73,5 @@ root = _tool$options.root; | ||
} else { | ||
var filePaths = glob.sync(path.join(root, 'config/' + appName + '.{js,json,json5}'), { absolute: true }); | ||
var filePaths = glob.sync(path.join(root, configFolder, appName + '.{js,json,json5}'), { absolute: true }); | ||
var fileNames = ['config/' + appName + '.js', 'config/' + appName + '.json', 'config/' + appName + '.json5']; | ||
var fileNames = [path.join(configFolder, appName + '.js'), path.join(configFolder, appName + '.json'), path.join(configFolder, appName + '.json5')]; | ||
@@ -90,3 +91,3 @@ this.tool.debug('Resolving in order: ' + fileNames.join(', ')); | ||
this.tool.debug('Found in config/' + path.basename(config)); | ||
this.tool.debug('Found ' + path.basename(config)); | ||
} | ||
@@ -251,4 +252,6 @@ | ||
var fileName = preset ? appName + '.preset.' + ext : appName + '.' + ext; | ||
var configFolder = this.tool.options.configFolder; | ||
return path.resolve(this.tool.options.root, 'node_modules/' + moduleName + '/config/' + fileName); | ||
return path.resolve(this.tool.options.root, 'node_modules', moduleName, configFolder, fileName); | ||
} | ||
@@ -255,0 +258,0 @@ }]); |
@@ -85,2 +85,4 @@ import _toConsumableArray from 'babel-runtime/helpers/toConsumableArray'; | ||
if (debugs.length > 0 && debug) { | ||
output.push(''); | ||
debugs.forEach(function (log) { | ||
@@ -87,0 +89,0 @@ output.push(_this2.renderMessage(log)); |
@@ -43,3 +43,4 @@ import _extends from 'babel-runtime/helpers/extends'; | ||
_this.options = new Options(options, { | ||
appName: string(), | ||
appName: string().required(), | ||
configFolder: string('./config'), | ||
extendArgv: bool(true), | ||
@@ -46,0 +47,0 @@ footer: string().empty(), |
@@ -115,2 +115,3 @@ 'use strict'; | ||
appName = _tool$options.appName, | ||
configFolder = _tool$options.configFolder, | ||
pluginAlias = _tool$options.pluginAlias, | ||
@@ -133,5 +134,5 @@ root = _tool$options.root; | ||
} else { | ||
var filePaths = _glob2.default.sync(_path2.default.join(root, 'config/' + appName + '.{js,json,json5}'), { absolute: true }); | ||
var filePaths = _glob2.default.sync(_path2.default.join(root, configFolder, appName + '.{js,json,json5}'), { absolute: true }); | ||
var fileNames = ['config/' + appName + '.js', 'config/' + appName + '.json', 'config/' + appName + '.json5']; | ||
var fileNames = [_path2.default.join(configFolder, appName + '.js'), _path2.default.join(configFolder, appName + '.json'), _path2.default.join(configFolder, appName + '.json5')]; | ||
@@ -151,3 +152,3 @@ this.tool.debug('Resolving in order: ' + fileNames.join(', ')); | ||
this.tool.debug('Found in config/' + _path2.default.basename(config)); | ||
this.tool.debug('Found ' + _path2.default.basename(config)); | ||
} | ||
@@ -312,4 +313,6 @@ | ||
var fileName = preset ? appName + '.preset.' + ext : appName + '.' + ext; | ||
var configFolder = this.tool.options.configFolder; | ||
return _path2.default.resolve(this.tool.options.root, 'node_modules/' + moduleName + '/config/' + fileName); | ||
return _path2.default.resolve(this.tool.options.root, 'node_modules', moduleName, configFolder, fileName); | ||
} | ||
@@ -316,0 +319,0 @@ }]); |
@@ -120,2 +120,4 @@ 'use strict'; | ||
if (debugs.length > 0 && debug) { | ||
output.push(''); | ||
debugs.forEach(function (log) { | ||
@@ -122,0 +124,0 @@ output.push(_this2.renderMessage(log)); |
@@ -89,3 +89,4 @@ 'use strict'; | ||
_this.options = new _optimal2.default(options, { | ||
appName: (0, _optimal.string)(), | ||
appName: (0, _optimal.string)().required(), | ||
configFolder: (0, _optimal.string)('./config'), | ||
extendArgv: (0, _optimal.bool)(true), | ||
@@ -92,0 +93,0 @@ footer: (0, _optimal.string)().empty(), |
{ | ||
"name": "boost", | ||
"version": "0.26.0", | ||
"version": "0.27.0", | ||
"description": "Robust pipeline for creating build tools that separate logic into routines and tasks.", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -63,3 +63,8 @@ /** | ||
const { appName, pluginAlias, root } = this.tool.options; | ||
const { | ||
appName, | ||
configFolder, | ||
pluginAlias, | ||
root, | ||
} = this.tool.options; | ||
const camelName = camelCase(appName); | ||
@@ -84,3 +89,3 @@ let config = {}; | ||
const filePaths = glob.sync( | ||
path.join(root, `config/${appName}.{js,json,json5}`), | ||
path.join(root, configFolder, `${appName}.{js,json,json5}`), | ||
{ absolute: true }, | ||
@@ -90,5 +95,5 @@ ); | ||
const fileNames = [ | ||
`config/${appName}.js`, | ||
`config/${appName}.json`, | ||
`config/${appName}.json5`, | ||
path.join(configFolder, `${appName}.js`), | ||
path.join(configFolder, `${appName}.json`), | ||
path.join(configFolder, `${appName}.json5`), | ||
]; | ||
@@ -112,3 +117,3 @@ | ||
this.tool.debug(`Found in config/${path.basename(config)}`); | ||
this.tool.debug(`Found ${path.basename(config)}`); | ||
} | ||
@@ -315,5 +320,12 @@ | ||
const fileName = preset ? `${appName}.preset.${ext}` : `${appName}.${ext}`; | ||
const { configFolder } = this.tool.options; | ||
return path.resolve(this.tool.options.root, `node_modules/${moduleName}/config/${fileName}`); | ||
return path.resolve( | ||
this.tool.options.root, | ||
'node_modules', | ||
moduleName, | ||
configFolder, | ||
fileName, | ||
); | ||
} | ||
} |
@@ -73,2 +73,4 @@ /** | ||
if (debugs.length > 0 && debug) { | ||
output.push(''); | ||
debugs.forEach((log) => { | ||
@@ -75,0 +77,0 @@ output.push(this.renderMessage(log)); |
@@ -50,3 +50,4 @@ /** | ||
this.options = new Options(options, { | ||
appName: string(), | ||
appName: string().required(), | ||
configFolder: string('./config'), | ||
extendArgv: bool(true), | ||
@@ -53,0 +54,0 @@ footer: string().empty(), |
@@ -20,2 +20,4 @@ /** | ||
appName: string, | ||
configFolder: string, | ||
extendArgv: string, | ||
footer: string, | ||
@@ -22,0 +24,0 @@ header: string, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
369830
4508