设置手写笔的自动编译 [英] Setting up auto compile for stylus

查看:116
本文介绍了设置手写笔的自动编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的mac上安装了node.js / stylus / nib,我可以在命令行上手动编译.styl文件到css。我也知道有这样stylus.middleware()东西,当我搜索如何设置自动编译时.styl更改,但我不知道我应该如何实现它(我从来没有使用过节点。 js before)。

I have installed node.js/stylus/nib on my mac and I can manually compile .styl file to css on the command line. I also know there is this stylus.middleware() things that keeps coming up when I search for how to setup auto-compiling when the .styl changes however I have no idea how I am supposed to implement it (I have never used node.js before).

我把这些代码放在哪个文件中?

如何启动这个代码,使其始终运行?

What file do I put that code in?
How do I start this code so it is always run?

我想我在节点方面缺少了一些东西,以便能够进行设置。

I think I am missing a few things on the node side to be able to set this up.

推荐答案

在命令行中,您可以使用:

From the command line you can use:


stylus -w文件夹/

stylus -w folder/

它将监视更改并编译该文件夹下所有的* .styl文件。

It will watch for changes and compile all *.styl files that live under that folder.

这篇关于设置手写笔的自动编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆