Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Vjp/use spago #122

Merged
merged 15 commits into from
Jun 3, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"build-all": "yarn run build-ui && yarn run build-css",
"postinstall": "npm i && cd css && npm i",
"postinstall": "",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The infinite loop was caused by the first npm i && . postinstall only runs after npm i is called so running it from a postinstall will result in an infinite loop.

With a postinstall of "cd css && npm i", you basically end up with:

alias npm i="npm i && cd css && npm i"

With a postinstall of just "npm i", you'd end up with something like:

alias npm i="npm i && npm i && npm i && npm i && npm && ..."

I'm not sure if my example is clear, but

"clean": "rm -rf output .spago node_modules && cd css && rm -rf node_modules",
"build-ui": "yarn run spago build -p \"ui-guide/**/*.purs\" -u \"$RTS_ARGS\" && purs bundle output/*/*.js -o dist/example.js $RTS_ARGS",
"watch-ui": "yarn run spago bundle-app -w -u \"$RTS_ARGS\" --then 'yarn run build-css' -p \"ui-guide/**/*.purs\" --to dist/example.js",
Expand Down