Skip to content

Commit

Permalink
bin/webpack* - run yarn scripts without extra --
Browse files Browse the repository at this point in the history
Prevents yarn from complaining:

```diff
 $ bin/webpack
 yarn run v1.13.0
-warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
 $ /home/himdel/manageiq-ui-classic/node_modules/.bin/webpack --config /home/himdel/manageiq-ui-classic/config/webpack/development.js
 ...
```

at the cost of losing pre-yarn-1.0.0 compatibility.
  • Loading branch information
himdel committed Jan 28, 2019
1 parent 6bcbfeb commit ddbd183
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/webpack
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ newenv = {
"NODE_PATH" => NODE_MODULES_PATH.shellescape,
"NODE_OPTIONS" => "--max_old_space_size=4096"
}
cmdline = ["yarn", "run", "webpack", "--", "--config", WEBPACK_CONFIG] + ARGV
cmdline = ["yarn", "run", "webpack", "--config", WEBPACK_CONFIG] + ARGV

Dir.chdir(APP_PATH) do
exec newenv, *cmdline
Expand Down
2 changes: 1 addition & 1 deletion bin/webpack-dev-server
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ newenv = {
"NODE_OPTIONS" => "--max_old_space_size=4096"
}.freeze

cmdline = ["yarn", "run", "webpack-dev-server", "--", "--progress", "--color", "--config", WEBPACK_CONFIG] + ARGV
cmdline = ["yarn", "run", "webpack-dev-server", "--progress", "--color", "--config", WEBPACK_CONFIG] + ARGV

Dir.chdir(APP_PATH) do
exec newenv, *cmdline
Expand Down

0 comments on commit ddbd183

Please sign in to comment.