Closed chemoish closed 8 years ago
You should try just-wait. It's more flexible.
Works thanks!
"scripts": {
"start": "node ./node_modules/concurrently/src/main --kill-others \"npm run watch-server\" \"npm run watch-client\" \"npm run start-server\"",
"build-client": "node ./node_modules/webpack/bin/webpack --config webpack/webpack.config.client-build",
"build-server": "node ./node_modules/webpack/bin/webpack --config webpack/webpack.config.server-build",
"start-server": "node ./node_modules/just-wait/bin/just-wait --pattern \"build/index.js\" && (cd build && node ./index)",
"watch-client": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server --config webpack/webpack.config.client-start",
"watch-server": "rm -rf build && node ./node_modules/webpack/bin/webpack --colors --config webpack/webpack.config.server-start",
"test": "karma start --single-run"
}
So I am continually exploring the SSR/CSS stuff we spoke about before and it finally has lead me to this…
wait-run --pattern "build/index.js" "(cd build && node index)"
This doesn't work with wait-run, but do you know if its possible to execute subshells within your setup?
Additional information:
The location you execute
node
determines your static paths, relatively. This ends up effecting webpack'spublicPath
configuration.However, if you run
concurrently --kill-others "npm run watch-server" "npm run watch-client"
—manually wait—then run the command above, it works.