webpack-super

a functional approach to writing webpack configs
Installation
npm install webpack-super --save
Functions
appendAt(path, value, obj) ⇒ object
Creates a new object with the value set at the path provided and copy the rest.
Kind: global function
Implements: Transformer
| path | string | path string where the value needs to be set |
| value | any | the value that needs to be set |
| obj | object | the object that needs to be transformed |
compose(...funcs) ⇒ function
Creates a composition factory functions
Kind: global function
Implements: Helper
| ...funcs | function | factory functions |
copy(path, source, destination) ⇒ object
Copies a value at a path from source to destination
Kind: global function
Implements: Transformer
| path | string | path string where the value needs to be picked/set |
| source | object | source object from where the value needs to be picked |
| destination | object | destination object where the value needs to be set |
Example
copy('a.b', {a: {b: 100}}, {p: 100})
setAt(path, value, obj) ⇒ object
Creates a new object with the value set at the path provided and copy the rest.
Kind: global function
Implements: Transformer
Returns: object - the new object with the value
| path | string | path string where the value needs to be set |
| value | any | the value that needs to be set |
| obj | object | the object that needs to be transformed |
Example
setAt('entry', './src/main.js', {})
setAt('output.filename', '[hash].bundle.js', {})
when(condition, func) ⇒ function
Returns a new function that is either has no effect (identity) or
or has the same as the passed func based on the condition.
Kind: global function
Implements: Transformer
| condition | boolean | the condition |
| func | function | the function to be called |