Browse Source

Preparing docs for v5

v5.0.0-beta docs-v4
Eli Perelman 8 years ago
parent
commit
eafa888b3c
  1. 11
      docs/FAQ.md
  2. 2
      docs/api/README.md
  3. 2
      docs/creating-presets.md
  4. 6
      docs/customization/advanced.md
  5. 2
      docs/customization/simple.md

11
docs/FAQ.md

@ -55,6 +55,15 @@ config.plugins = config.plugins.map(plugin => {
This forces a much higher maintenance burden on your project, and this is only a very simple example. Modifying This forces a much higher maintenance burden on your project, and this is only a very simple example. Modifying
loaders created from raw Webpack configuration objects can be **much** more unwieldy. loaders created from raw Webpack configuration objects can be **much** more unwieldy.
Using [webpack-chain](https://github.com/mozilla-rpweb/webpack-chain) affords Neutrino the ability to identify and Using [webpack-chain](https://github.com/mozilla-neutrino/webpack-chain) affords Neutrino the ability to identify and
manipulate parts of the configuration without resorting to object and array manipulation hacks, something not currently manipulate parts of the configuration without resorting to object and array manipulation hacks, something not currently
possible when working with raw Webpack configuration data. possible when working with raw Webpack configuration data.
### Can I just re-use my existing Webpack configuration?
The Neutrino configuration does let you merge a configuration object, but does not accept a normal Webpack configuration
out of the box. Since Neutrino uses webpack-chain and enforces naming of plugins, rules, and loaders, you must use an
object that corresponds with this "schema". Typically this would involve transforming your Webpack configuration to nest
entities requiring a name into an object which maps the name to the entity.
In short, you must transform your Webpack configuration in order to merge it into the Neutrino configuration cleanly.

2
docs/api/README.md

@ -52,7 +52,7 @@ will be merged.
### `.config` ### `.config`
When constructing a Neutrino instance, a property of `.config` is set to be a new instance of When constructing a Neutrino instance, a property of `.config` is set to be a new instance of
[webpack-chain](https://github.com/mozilla-rpweb/webpack-chain). This property is then available to all presets, which [webpack-chain](https://github.com/mozilla-neutrino/webpack-chain/tree/v1.4.3). This property is then available to all presets, which
subsequently augment it with their specific options. Every preset added uses this single `.config` to store their data, subsequently augment it with their specific options. Every preset added uses this single `.config` to store their data,
meaning that preset load order has an effect on which config values take precedence. Presets loaded later will override meaning that preset load order has an effect on which config values take precedence. Presets loaded later will override
values set by earlier presets. values set by earlier presets.

2
docs/creating-presets.md

@ -33,7 +33,7 @@ export default neutrino => {
## Configuring ## Configuring
The Neutrino instance provided to your custom configurator has a `config` property that is an instance of The Neutrino instance provided to your custom configurator has a `config` property that is an instance of
[webpack-chain](https://github.com/mozilla-rpweb/webpack-chain). We won't go in-depth of all the configuration [webpack-chain](https://github.com/mozilla-neutrino/webpack-chain/tree/v1.4.3). We won't go in-depth of all the configuration
possibilities here, but encourage you to check out the documentation for webpack-chain for instruction on your possibilities here, but encourage you to check out the documentation for webpack-chain for instruction on your
particular use case. particular use case.

6
docs/customization/advanced.md

@ -7,7 +7,7 @@ needed.
## Creating a project-specific preset ## Creating a project-specific preset
Neutrino configurations are backed by [webpack-chain](https://github.com/mozilla-rpweb/webpack-chain), a library for Neutrino configurations are backed by [webpack-chain](https://github.com/mozilla-neutrino/webpack-chain/tree/v1.4.3), a library for
making modifications to a Webpack configuration using a fluent or chained API. When your project needs more advanced making modifications to a Webpack configuration using a fluent or chained API. When your project needs more advanced
build overrides, you will be interacting with this API in order to perform modifications. build overrides, you will be interacting with this API in order to perform modifications.
@ -49,7 +49,7 @@ Other than actually changing the config, that is all the setup necessary for Neu
## Configuring ## Configuring
The Neutrino instance provided to your custom configurator has a `config` property that is an instance of The Neutrino instance provided to your custom configurator has a `config` property that is an instance of
[webpack-chain](https://github.com/mozilla-rpweb/webpack-chain). We won't go in-depth of all the configuration [webpack-chain](https://github.com/mozilla-neutrino/webpack-chain/tree/v1.4.3). We won't go in-depth of all the configuration
possibilities here, but encourage you to check out the documentation for webpack-chain for instruction on your possibilities here, but encourage you to check out the documentation for webpack-chain for instruction on your
particular use case. particular use case.
@ -81,5 +81,5 @@ module.exports = neutrino => {
``` ```
Presets can also have their own custom data in addition to the Neutrino config. See your respective preset for details. Presets can also have their own custom data in addition to the Neutrino config. See your respective preset for details.
Again, rather than reiterate the documentation for [webpack-chain](https://github.com/mozilla-rpweb/webpack-chain) here, Again, rather than reiterate the documentation for [webpack-chain](https://github.com/mozilla-neutrino/webpack-chain/tree/v1.4.3) here,
please refer to its documentation for all ways you can modify a config instance to solve your use cases. please refer to its documentation for all ways you can modify a config instance to solve your use cases.

2
docs/customization/simple.md

@ -40,7 +40,7 @@ Add a new property to `config` named `neutrino`. This will be an object where we
``` ```
Populate this object with configuration overrides. This is not a Webpack configuration, but rather a Neutrino-compatible Populate this object with configuration overrides. This is not a Webpack configuration, but rather a Neutrino-compatible
object based on [webpack-chain](https://github.com/mozilla-rpweb/webpack-chain). object based on [webpack-chain](https://github.com/mozilla-neutrino/webpack-chain/tree/v1.4.3).
## Usage ## Usage

Loading…
Cancel
Save