【发布时间】:2016-07-14 10:32:00
【问题描述】:
我从boilderplate 开始吃早午餐。现在我想在这里包括bootstrap-styl。我已经用 npm 安装了引导程序,工作正常。现在它位于 node_modules 文件夹中。当我尝试在 *.styl 文件中 @import bootstrap 时出现问题。
failed to locate @import file bootstrap.styl
根据文档,这是我让它工作所需要的:
var bootstrap = require('bootstrap-styl'),
stylus = require('stylus');
function compile(str) {
return stylus(str)
.use(bootstrap());
}
那么我到底需要在哪里写这个?在我的任何脚本中?我完全不明白这个洞是如何运作的。试着把这段代码放到空的脚本文件里,还是没有结果。
【问题讨论】:
标签: node.js twitter-bootstrap stylus brunch