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

Update spin up to spin watch so npm run spin works. #1284

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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 @@ -37,7 +37,7 @@
"yaml-front-matter": "^4.1.1"
},
"scripts": {
"spin": "nodemon --watch content --watch static --watch templates --watch spin-up-hub --ext html,md,rhai,hbs,css,js --verbose --legacy-watch --signal SIGINT --exec 'npm run build-index && npm run build-hub-index && spin up --file spin.toml --quiet --env PREVIEW_MODE=$PREVIEW_MODE'",
"spin": "nodemon --watch content --watch static --watch templates --watch spin-up-hub --ext html,md,rhai,hbs,css,js --verbose --legacy-watch --signal SIGINT --exec 'npm run build-index && npm run build-hub-index && spin watch --file spin.toml --quiet --env PREVIEW_MODE=$PREVIEW_MODE'",
Copy link
Contributor

Choose a reason for hiding this comment

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

You do not need both spin watch and spin up. They effectively serve the same purpose of restartting. We got to choose one or the other,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @karthik2804
Not sure I understand. There is only one spin command in the package.json (spin watch) so as far as I can tell after this update the site will exclusively use spin watch.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this might be a typo for not needing both spin watch and nodemon --watch. If nodemon is already watching, it shouldn't be telling Spin to watch, just to run. Conversely, if both are watching, spin watch get as far as going "oh there's a change I better restart spin up" and then nodemon will swoop in and kills it.

"bundle-scripts": "parcel watch static/js/src/main.js --dist-dir static/js --no-source-maps",
"styles": "parcel watch static/sass/styles.scss --dist-dir static/css",
"test": "npx markdownlint-cli2 content/**/*.md \"#node_modules\" && npm run check-broken-links",
Expand Down
Loading