Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add npm-run-all #2173

Merged
merged 6 commits into from
May 2, 2019
Merged

Add npm-run-all #2173

merged 6 commits into from
May 2, 2019

Conversation

knowler
Copy link
Member

@knowler knowler commented May 2, 2019

This lets us run related scripts together pretty easily since we can use glob patterns (e.g. lint:*** is supported too). You can either run scripts sequentially with run-s or in parallel with run-p.

See: https://github.com/mysticatea/npm-run-all

knowler added 2 commits May 2, 2019 14:04
This lets us run related scripts together pretty easily since we can
use glob patterns (e.g. `lint:*` — `**` is supported too). You can
either run scripts sequentially with `run-s` or in parallel with
`run-p`.

See: https://github.com/mysticatea/npm-run-all
This way lint issues for the scripts doesn’t block the styles from being
linted.
@knowler knowler force-pushed the sage-10-add-npm-run-all branch from 2a40bb8 to 51b7d5d Compare May 2, 2019 20:24
@knowler
Copy link
Member Author

knowler commented May 2, 2019

It could also be helpful to break up the build:production command:

    "build:production": "run-s clean build:production:*",
    "build:production:mix": "cross-env NODE_ENV=production webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",

knowler added 4 commits May 2, 2019 14:54
* Break up `build:production`
* Refine `start` script to call `build` but using `--watch`
  * Since the base command is the same, this makes it easier to
    maintain.
* Use run-s for `test` script for consistency.
The only thing that differs between `build` and `build:production` is
the Node environment variable. We can use `run-s build:mix` preceeded by
the correspinding environment setting.
We need to pass `--watch` to the `build:mix` not `build`. Also, this
means we need to set the Node environment beforehand since `build:mix`
doesn’t have that.
`dist` needs to exist for HMR to work since it looks for `dist/hot`.
This means we should probably build once before starting HMR. This also
renames `build:mix` to just `mix` to keep a consistent naming scheme.
@retlehs retlehs merged commit b2511c2 into 10.0.0-dev May 2, 2019
@retlehs retlehs deleted the sage-10-add-npm-run-all branch May 2, 2019 22:01
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants