【发布时间】:2014-08-21 17:10:45
【问题描述】:
我对整个 NodeJS 风暴都是新手,经过一番研究,我决定使用 Sails.JS 作为我的框架。
一切正常,直到我尝试使用 Bootstrap Bootswatch .less 文件。
如果我将 bootswatch.less 复制到我的样式文件夹中,然后刷新页面,我的所有资产都会引发 404 错误。
我的目录树如下所示:
Root
|_api
|_assets
|_|_images
|_|_linker
|_|_|_fonts
|_|_|_js
|_|_|_styles
|_|_|_|_bootstrap.css
|_|_|_|_custom.less
|_|_|_|_variables.less
|_|_|_|_bootswatch.less
|_|_|_templates
|_configs
etc.
我的 gruntfile.js 看起来像这样:
var cssFilesToInject = [
'linker/styles/variables.less',
'linker/styles/bootstrap.css',
'linker/styles/bootswatch.less',
'linker/styles/custom.less',
'linker/**/*.css'
];
我尝试使用sails lift --verbose 启动服务器,没有抛出任何错误。
【问题讨论】:
标签: javascript css node.js less sails.js