Node.js Express - How do I compile Stylus .styl files into CSS

别来无恙 提交于 2019-12-07 12:16:18

问题


I'm trying to build an application starting from Balloons (http://balloons.io), which uses Backbone.js and express to setup the UI. I've never used these frameworks, and I'm having a hard time actually making changes.

As I understand it, .styl files are compiled into CSS files. How do I do this compilation?


回答1:


For production systems you'd use a stylus executable to convert .styl to .css before deployment. It's as easy as doing:

stylus css --out stylesheet_dir

in the folder where your .styl files reside.

For development you can use stylus middleware to convert files on the fly.



来源:https://stackoverflow.com/questions/13225447/node-js-express-how-do-i-compile-stylus-styl-files-into-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!