Skip to content

Commit

Permalink
docs(scaffolding): lowercase Webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
misterdev committed Mar 15, 2019
1 parent b94b0de commit d19c1f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SCAFFOLDING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Introduction

Setting up Webpack for the first time is hard. Writing advanced configurations to optimize performance is even harder. The `init` feature is designed to support people that want to create their own configuration or initializing other projects people create.
Setting up webpack for the first time is hard. Writing advanced configurations to optimize performance is even harder. The `init` feature is designed to support people that want to create their own configuration or initializing other projects people create.

## Creating a scaffold

Expand Down Expand Up @@ -60,7 +60,7 @@ webpack-cli init webpack-scaffold-yourpackage

## API

To create a `scaffold`, you must create a [`yeoman-generator`](http://yeoman.io/authoring/). Because of that, you can optionally extend your generator to include methods from the [Yeoman API](http://yeoman.io/learning/). It's worth noting that we support all the properties of a regular Webpack configuration. In order for us to do this, there's a thing you need to remember:
To create a `scaffold`, you must create a [`yeoman-generator`](http://yeoman.io/authoring/). Because of that, you can optionally extend your generator to include methods from the [Yeoman API](http://yeoman.io/learning/). It's worth noting that we support all the properties of a regular webpack configuration. In order for us to do this, there's a thing you need to remember:

> Objects are made using strings, while strings are made using double strings. This means that in order for you to create a string, you have to wrap it inside another string for us to validate it correctly.
Expand All @@ -87,7 +87,7 @@ constructor(args, opts) {
```
### `opts.env.configuration.myObj` (required)

This is your scaffold, you add here the options that the CLI will transform into a Webpack configuration. You can have many different scaffolds named as you prefer, representing different configurations like `dev.config` or `prod.config`:
This is your scaffold, you add here the options that the CLI will transform into a webpack configuration. You can have many different scaffolds named as you prefer, representing different configurations like `dev.config` or `prod.config`:

```js
constructor(args, opts) {
Expand All @@ -101,7 +101,7 @@ constructor(args, opts) {

### `myObj.webpackOptions` (required)

This object has the same format as a regular Webpack configuration, so you declare here the properties that you want to scaffold, like `entry`, `output` and `context`. You can initialize this inside a yeoman method:
This object has the same format as a regular webpack configuration, so you declare here the properties that you want to scaffold, like `entry`, `output` and `context`. You can initialize this inside a yeoman method:

```js
this.options.env.configuration.dev.webpackOptions = {
Expand Down

0 comments on commit d19c1f7

Please sign in to comment.