Closed dmitrykiselyov closed 9 years ago
Thanks. Can you add on to this with JavaScript (instead of Coffee) and Autoprefixer and have it watch a specific directory and output to a specific directory (to be more inline with the other instructions)?
But Brunch is different :smile: Config by default is coffee. Min config and all ready to go
exports.config =
files:
javascripts:
joinTo: 'app.js'
stylesheets:
joinTo: 'app.css'
Oh is Brunch heavily Coffee friendly? :)
Want to open a PR and get some GitHub commit credit?
No :smile: Just a second, please.
Ok, instruction 100% is ready :+1:
Okay, just confirming you don't want to PR?
Ok. But tommorow. It's too late.
PR https://github.com/corysimmons/lost/pull/101 merged. This issue can be closed now.
@corysimmons, I'm completely new to Brunch (just started today), but according to Brunch's doc, you can use either 'coffeescript' or 'javascript' as your config file. Here is the closest JS to your gulp file.
exports.config = {
paths: {
"public": 'dist'
},
files: {
stylesheets: {
joinTo: 'css/app.css'
}
},
plugins: {
postcss: {
config: function(postcss) {
return postcss()
.use(require('autoprefixer')(['last 1 versions']))
.use(require('lost'));
}
}
}
}
Ah alright thanks.
Brunch
npm install -g brunch
brunch new https://github.com/brunch/dead-simple
npm install --save LaurentTreguier/postcss-brunch
npm install --save autoprefixer
npm install --save lost
brunch-config.coffee
brunch watch
This will watch your app/style.css file for any changes and then process it with Autoprefixer and Lost Grid (which will convert Lost Grid rules into vanilla CSS code), and output the processed CSS to public/app.css.
NOTE: postcss-brunch has issue, but with this fix is ok, but will work only with a vanilla CSS and Less.
⬆ back to top