@untool/core
Advanced tools
Comparing version 0.14.0 to 0.15.0
@@ -6,2 +6,13 @@ # Change Log | ||
<a name="0.15.0"></a> | ||
# [0.15.0](https://github.com/untool/untool/compare/v0.14.2...v0.15.0) (2018-08-02) | ||
### Features | ||
* **core:** make `bootstrap()`/`getConfig()` accept config overrides ([ba0b821](https://github.com/untool/untool/commit/ba0b821)) | ||
<a name="0.14.0"></a> | ||
@@ -8,0 +19,0 @@ # [0.14.0](https://github.com/untool/untool/compare/v0.13.0...v0.14.0) (2018-07-25) |
@@ -171,3 +171,3 @@ const debug = require('debug')('untool:config'); | ||
exports.getConfig = () => { | ||
exports.getConfig = (overrides) => { | ||
const pkgFile = findUp('package.json'); | ||
@@ -185,3 +185,7 @@ const pkgData = require(pkgFile); | ||
const raw = merge(defaults, presets, settings); | ||
const mergeAndOverride = (...args) => | ||
typeof overrides === 'function' | ||
? overrides(merge(...args)) | ||
: merge(...args, overrides); | ||
const raw = mergeAndOverride(defaults, presets, settings); | ||
delete raw.presets; | ||
@@ -188,0 +192,0 @@ |
@@ -13,4 +13,4 @@ const debug = require('debug')('untool:core'); | ||
exports.bootstrap = function bootstrap(...args) { | ||
const config = environmentalize(getConfig()); | ||
exports.bootstrap = function bootstrap(overrides, ...args) { | ||
const config = environmentalize(getConfig(overrides)); | ||
const mixins = config.mixins.core.map((mixin) => require(mixin)); | ||
@@ -17,0 +17,0 @@ const strategies = { |
{ | ||
"name": "@untool/core", | ||
"version": "0.14.0", | ||
"version": "0.15.0", | ||
"description": "untool core", | ||
@@ -5,0 +5,0 @@ "main": "lib/core.js", |
21549
244