jgthms / bulma-start

Start package for Bulma
https://www.npmjs.com/package/bulma-start
MIT License
276 stars 82 forks source link

npm start doesn't track changes #8

Closed frispete closed 6 years ago

frispete commented 6 years ago

Just started with Bulma, (reading the book), npm, so please bear with me.. In order to get my feeds wet, I fiddled a bit with bulma-start. I second the opinion, that npm install bulma-start isn't fully satisfying..

I did:

$ npm install bulma-start
$ cd ~/src/GIT/bulma-book
$ cp -a ~/node_modules/bulma-start start
$ cd start
$ npm install
[...]
added 394 packages in 16.03s
$ npm start
> bulma-start@0.0.2 start /home/hp/src/GIT/bulma-book/start
> npm run css-watch | npm run js-watch

> bulma-start@0.0.2 js-watch /home/hp/src/GIT/bulma-book/start
> npm run js-build -- --watch

> bulma-start@0.0.2 js-build /home/hp/src/GIT/bulma-book/start
> babel _javascript --out-dir lib "--watch"

_javascript/main.js -> lib/main.js

I'm still undecided, how to interpret npm run css-watch | npm run js-watch here, is it as pipe command? Anyway, that part seems to not work as expected, since changes to _sass/main.scss aren't picked up...

Running:

$ npm run css-watch | npm run js-watch

> bulma-start@0.0.2 js-watch /home/hp/src/GIT/bulma-book/start
> npm run js-build -- --watch

> bulma-start@0.0.2 js-build /home/hp/src/GIT/bulma-book/start
> babel _javascript --out-dir lib "--watch"

_javascript/main.js -> lib/main.js

doesn't cut it as well.

Running:

$ npm run css-watch

> bulma-start@0.0.2 css-watch /home/hp/src/GIT/bulma-book/start
> npm run css-build -- --watch

> bulma-start@0.0.2 css-build /home/hp/src/GIT/bulma-book/start
> node-sass _sass/main.scss css/main.css "--watch"

=> changed: /home/hp/src/GIT/bulma-book/start/_sass/main.scss
Rendering Complete, saving .css file...
Wrote CSS to /home/hp/src/GIT/bulma-book/start/css/main.css
=> changed: /home/hp/src/GIT/bulma-book/start/_sass/main.scss
Rendering Complete, saving .css file...
Wrote CSS to /home/hp/src/GIT/bulma-book/start/css/main.css
=> changed: /home/hp/src/GIT/bulma-book/start/_sass/main.scss
Rendering Complete, saving .css file...
Wrote CSS to /home/hp/src/GIT/bulma-book/start/css/main.css

does.

Environment: npm/5.6.0 node/v9.11.1 linux x64"

frispete commented 6 years ago

Okay, it is a pipe command, but the pipe is misused in order to run these processes in parallel.

Yes, the pipe results in both commands started, but as long as the second command doesn't read from stdin, the first command is stalled, and that's exactly, what I'm experiencing here.

Will send a PR with a fix, that is working fine here, based on npm-run-all!