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

Is there a way to build a .css (for production)? #32

peterbarraud opened this Issue Nov 12, 2017 · 2 comments


2 participants
Copy link

peterbarraud commented Nov 12, 2017

Maybe use some syntax like:

browserify MyComponent.js -t [scssify --output bundle.css] >bundle.js

This comment has been minimized.

Copy link

cody-greene commented Nov 12, 2017

No. If you want to compile a standalone .css file just use node-sass directly.

$ npm install node-sass
$ node_modules/.bin/node-sass \
    ./src/styles/index.scss \
    >build/bundle.css \
    --output-style compressed

This comment has been minimized.

Copy link

peterbarraud commented Nov 26, 2017

I have implemented a onSendToCSSFile functionality that sends the CSS output to the client.

See the project I've created at: Browserify with Budo & SCSSIFY

The reason I've taken this approach, is that scssify is pretty neat at handling SCSS require statements in the index.js. In my project, if you install bulma and uncomment the require statement in index.js, scssify works perfect in the livereload. But if I put this functionality in, I can use it also to build.

So I've created the onSendToCSSFile callback in the scssify/lib/index.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment