Search code examples
node.jstwitter-bootstrapstylusbrunchchaplinjs

Referencing .styl of a node_module in Brunch


I have a brunch-with-Chaplin app. I want to use Twitter Bootstrap, but since it's written in LESS I would prefer to switch to a stylus version. Luckily there is a bootstrap-stylus node_module out there. So I install it via npm install bootstrap-stylus. But then how do I reference the stylus files that are inside the module? Doing

@import 'bootstrap-stylus'

doesn't work. Neither does appending the /lib/bootstrap path.

I have "bootstrap-stylus": ">= 0.2" in my dependencies in the package.json file but still no go. Any ideas? Thanks.


Solution

  • npm installs into your node_modules folder, you can @import stylus files from there.

    The line that worked in my test was:

    @import 'node_modules/bootstrap-stylus/lib/bootstrap.styl'