如何在sails.js中使用.less文件?

Vad*_*est 7 javascript less twitter-bootstrap sails.js

我正在阅读http://sailsjs.org/#!documentation/assets但我不知道如何使用.less文件.

我把资产/链接器/样式/中的vairables.less和bootswatch.less都放了

我希望grunt会编译这两个文件,但它没有,我在浏览器控制台中遇到错误:

GET http://localhost:5000/linker/styles/bootstrap-responsive.css 404 (Not Found) (index):14
GET http://localhost:5000/linker/styles/bootstrap.css 404 (Not Found) (index):15
GET http://localhost:5000/linker/js/jquery.js 404 (Not Found) (index):29
GET http://localhost:5000/linker/js/socket.io.js 404 (Not Found) (index):30
GET http://localhost:5000/linker/js/sails.io.js 404 (Not Found) (index):31
GET http://localhost:5000/linker/js/app.js 404 (Not Found) (index):32
GET http://localhost:5000/linker/js/bootstrap.js 404 (Not Found) 
Run Code Online (Sandbox Code Playgroud)

如果我删除两个.less文件它可以正常工作.我在这里错过了什么?

Vad*_*est 3

我决定不使用 sails 默认导入器。主要是因为我觉得它很糟糕,太多基于配置而不是约定。所以我根据约定优于配置制作了自己的动态资源加载器。

基本上,在我的中,没有什么可做的,资产将根据所使用的控制器、控制器操作、主题和布局来应用。而且它仍然使用 LESS。

这是一个基于 sails 的简单项目0.10.5https ://github.com/Vadorequest/sails-dynamic-assets