Skip to content

Commit 64db306

Browse files
committed
docs(examples): add yarn add webpack-cli step
Running node_modules/bin/webpack without webpack-cli installed will get hang. The culprit is that webpack expects a stdin of whether to install webpack-cli or not. However, as examples/build-common use `child_process.exec` to execute `webpack`, the user will not be prompted for any questions since the stdin is not piped and the stdout will be pass to parent process only after the child process exits. We can keep build-common simple by instructing devs to install webpack-cli before they build examples. Also rewrite the install step using yarn since we use yarn in webpack.
1 parent 7543c45 commit 64db306

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@
120120
If you think an example is missing, please report it as issue. :)
121121

122122
# Building an Example
123-
1. Run `npm install` in the root of the project.
124-
2. Run `npm link webpack` in the root of the project.
125-
3. Run `node build.js` in the specific example directory. (Ex: `cd examples/commonjs && node build.js`)
123+
1. Run `yarn` in the root of the project.
124+
2. Run `yarn link webpack` in the root of the project.
125+
3. Run `yarn add --dev webpack-cli` in the root of the project.
126+
4. Run `node build.js` in the specific example directory. (Ex: `cd examples/commonjs && node build.js`)
126127

127128
Note: To build all examples run `npm run build:examples`

0 commit comments

Comments
 (0)