Skip to content

Commit 3e3eb2b

Browse files
authored
Merge pull request #320 from SEAPUNK/hotfix/fix-two-dashes-in-npm-scripts
get-started: Fix and clarify usage of two dashes in npm scripts
2 parents b57c29c + a2d103a commit 3e3eb2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/get-started/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ Given it's not particularly fun to run webpack from the CLI this way, we can set
151151
{
152152
...
153153
"scripts": {
154-
"build": "webpack --"
154+
"build": "webpack"
155155
},
156156
...
157157
}
158158
```
159159

160160
You can now achieve the same as above by using `npm run build` command. npm picks up the scripts through it and patches the environment temporarily so that it contains the bin commands. You will see this convention a lot of projects out there.
161161

162-
T> I use `webpack --` so that we can pass custom parameters to webpack through npm.
162+
T> You can pass custom parameters to webpack by adding two dashes to the `npm run build` command, e.g. `npm run build -- --colors`.
163163

164164
## Conclusion
165165

0 commit comments

Comments
 (0)