diff --git a/.all-contributorsrc b/.all-contributorsrc new file mode 100644 index 0000000..1ae0cc7 --- /dev/null +++ b/.all-contributorsrc @@ -0,0 +1,24 @@ +{ + "projectName": "webpack-config-utils", + "projectOwner": "kentcdodds", + "files": [ + "README.md" + ], + "imageSize": 100, + "commit": false, + "contributors": [ + { + "login": "kentcdodds", + "name": "Kent C. Dodds", + "avatar_url": "https://avatars.githubusercontent.com/u/1500684?v=3", + "profile": "https://kentcdodds.com", + "contributions": [ + "code", + "doc", + "example", + "infra", + "test" + ] + } + ] +} diff --git a/README.md b/README.md index e43c9ce..ef51bf0 100644 --- a/README.md +++ b/README.md @@ -113,50 +113,16 @@ module.exports = env => { ## API -### `here` - -See the package details of [`here`](https://www.npmjs.com/package/here) - -### `combineLoaders` - -See the package details of [`webpack-combine-loaders`](https://www.npmjs.com/package/webpack-combine-loaders) - -### `propIf` - -This powers the methods returned from `getIfUtils` and `propIfNot`. It's actually just a simple ternary: - -``` -return getValue(add) ? value : alternate -``` - -Where `getValue` simply evaluates the given value - -### `propIfNot` - - - -### `removeEmpty` - - - -### `getIfUtils` - - - - -## Inspiration - - - -## Other Solutions - - +See the API Documentation [here][API Docs]. In addition to custom utilities from this package, it comes bundled with +a few other helpful utilities: [`path-here`](https://www.npmjs.com/package/path-here) (exposed as `here`) and [`webpack-combine-loaders`](https://www.npmjs.com/package/webpack-combine-loaders) (exposed as `combineLoaders`). ## Contributors Thanks goes to these people ([emoji key][emojis]): +| [
Kent C. Dodds](https://kentcdodds.com)
[💻](https://github.com/kentcdodds/webpack-config-utils/commits?author=kentcdodds) [📖](https://github.com/kentcdodds/webpack-config-utils/commits?author=kentcdodds) 💡 🚇 [⚠️](https://github.com/kentcdodds/webpack-config-utils/commits?author=kentcdodds) | +| :---: | This project follows the [all-contributors][all-contributors] specification. Contributions of any kind welcome! @@ -191,3 +157,4 @@ MIT [all-contributors]: https://github.com/kentcdodds/all-contributors [cross-env]: https://www.npmjs.com/package/cross-env [p-s]: https://www.npmjs.com/package/p-s +[API Docs]: https://doclets.io/kentcdodds/webpack-config-utils/master diff --git a/other/EXAMPLES.md b/other/EXAMPLES.md index df635b4..9dd68f9 100644 --- a/other/EXAMPLES.md +++ b/other/EXAMPLES.md @@ -1 +1,3 @@ # Examples + +There's nothing here! [But PRs are welcome!](http://makeapullrequest.com) diff --git a/other/ROADMAP.md b/other/ROADMAP.md index ab216af..0033b37 100644 --- a/other/ROADMAP.md +++ b/other/ROADMAP.md @@ -2,6 +2,13 @@ ## Want to do +There are definitely more utilities we could make, but I can't think of any right now. Feel free to file an issue to +discuss! + ## Might do +Similar to above + ## Wont do + +- Augment the Webpack API. I don't want to write a DSL on top of webpack's DSL. diff --git a/src/prop-if.js b/src/prop-if.js index 72b07fb..6cc45e3 100644 --- a/src/prop-if.js +++ b/src/prop-if.js @@ -5,11 +5,12 @@ export {propIf, propIfNot} * (to turn "true" to `true`). And if the result is truthy, then `value` will be returned, otherwise `alternate` will be * returned. This powers the (arguably more useful) methods returned from `getIfUtils`. * @example - * // returns 'value' * propIf(true, 'value', 'alternate') - * @example Is falsy sensitive - * // returns 'alternate' + * // returns 'value' + * @example + * // Is falsy sensitive * propIf(0, 'value', 'alternate') + * // returns 'alternate' * @param {*} add The value to evaluate * @param {*} value The value to return in a truthy case * @param {*} alternate The value to return in a falsy case diff --git a/src/remove-empty.js b/src/remove-empty.js index d6b467b..32a5527 100644 --- a/src/remove-empty.js +++ b/src/remove-empty.js @@ -3,7 +3,8 @@ export {removeEmpty} /** * Accepts an array and removes all undefined values (using `filter`) * - * @example Primary use case is in `plugins` where `undefined` values can cause issues + * @example + * // Primary use case is in `plugins` where `undefined` values can cause issues * module.exports = { * ... your config * plugins: removeEmpty([