我正在使用SASS,CoffeeScript,Jade和Brunch构建项目。除了我的application.sass
没有编译之外,一切都很完美。
这是我的早午餐config.coffee
exports.config =
modules:
definition: false
wrapper: false
conventions:
assets: /^app\/views/
files:
javascripts: joinTo:
'app.js': /^app\/scripts\/.*/
'index.js': /^app\/scripts\/index\.coffee/
stylesheets: joinTo:
'app.css': /^app\/styles\/application\.sass/
我的节点package.json
{
"name": "disynr",
"version": "0.0.0",
"description": "Website builder",
"main": "public/index.html",
"devDependencies": {
"brunch": "^1.8.5",
"coffee-script-brunch": "^1.8.2",
"javascript-brunch": "^1.7.1",
"sass-brunch": "^1.8.11",
"watch": "^0.16.0"
},
"author": "Samadi van Koten",
"license": "MIT",
"dependencies": {
"jade": "^1.11.0"
}
}
application.sass
body
font-family: Helvetica,Arial,sans-serif
和tree app
app
├── scripts
│ ├── _helpers.js
│ ├── helpers.coffee
│ └── index.coffee
├── styles
│ └── application.sass
└── views
├── head.jade
├── index.html
└── ui.jade
3 directories, 7 files
brunch b -d 2>&1 | grep application
的输出:
Mon, 14 Sep 2015 20:32:31 GMT brunch:file-list Reading 'app/styles/application.sass'
Mon, 14 Sep 2015 20:32:31 GMT brunch:watch File 'app/styles/application.sass' received event 'add'
应该由Brunch构建的文件public/app.css
在运行brunch build
或brunch watch
后不存在。
我使用的是Mac OS X Yosemite。如果需要更多信息,请发表评论。
答案 0 :(得分:2)
sass-brunch
插件以前需要ruby gem来处理.sass语法。现在已经向libsass添加了支持,原生扩展sass编译器sass-brunch
v1.9 +也可以。
要解决此问题:
npm install sass-brunch@1.9 --save