Skip to content

Emit error on stream. #45

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

Merged
merged 1 commit into from
Sep 17, 2015
Merged

Emit error on stream. #45

merged 1 commit into from
Sep 17, 2015

Conversation

zigomir
Copy link
Contributor

@zigomir zigomir commented Sep 17, 2015

I was having this issue when I've miss-typed a class name and css-modulesify would silently stop working when using watchify.

My package.json scripts object:

"scripts": {
    "start": "http-server -s & npm run watch-coffee",
    "build": "npm run build-coffee",
    "watch-coffee": "watchify -v -p [ css-modulesify -o dist/starterkit.css ] -t [ hbsfy -e thtml ] -t coffeeify starterkit/src/app.coffee -o dist/starterkit.js",
    "build-coffee": "browserify -p [ css-modulesify -o dist/starterkit.css ] -t [ hbsfy -e thtml ] -t coffeeify starterkit/src/app.coffee -o dist/starterkit.js"
  },

With this change error will emit back to watchify and recover will work as well.

Otherwise watchify will silently fail and won't recover even when there are no errors.
joshwnj added a commit that referenced this pull request Sep 17, 2015
@joshwnj joshwnj merged commit ee7071d into css-modules:master Sep 17, 2015
@joshwnj
Copy link
Member

joshwnj commented Sep 17, 2015

Good one, thanks @zigomir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants