用手写笔导入引导程序

我开始用boilderplate做早午餐。 现在我想在这里包括bootstrap-styl 。 我用npm安装了bootstrap,工作正常。 现在它位于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()); } 

那么我到底需要写些什么呢? 在我的任何脚本? 我完全不知道这个洞的工作原理。 试图把这个代码放在空脚本文件中,仍然没有结果。

stylus-brunch的自述文件确实解决了这个问题 – https://github.com/brunch/stylus-brunch#use-plugin-middleware

在你的情况下,你想编辑你的brunch-config有:

 config = plugins: stylus: plugins: ['bootstrap-stylus']