我正在使用Express和socket.io创建一个node.js应用程序.我想使用SASS,我看到有一个npm包,我不明白是如何在SASS npm和应用程序之间进行链接并使其解析SASS?
更新:我使用SASS中间件https://github.com/andrew/node-sass安装它,并按以下方式包含它:
sass = require('node-sass');
app.configure(function(){
app.set('port', process.env.PORT || 3000);
/* other stuff */
sass.middleware({
src: __dirname + '/public/stylesheets/sass',
dest: __dirname + '/public/stylesheets',
debug: true
});
});
Run Code Online (Sandbox Code Playgroud)
但它仍然无效