如何为静态网页“自动化”“手写笔”笔尖?

How to `automate` the `stylus` nib for static web page?

我正在使用 stylus 创建我的 css 文件。在 css3 供应商前缀和其他优势中,我使用 nib 包。

我不会使用 express 或任何其他服务器来构建我的网站。这是纯静态的。现在,每当 .styl 文件更改时,我都需要 运行 nib 包。

目前我正在通过手动 运行ning 这个命令:

stylus -u nib screen.styl - 效果很好。但我不想每次更改 .styl 文件时都 运行 这个。

是否有 运行 这个的自动化?或任何其他解决方法来处理这个问题?

示例 css 以上命令:

@import 'nib'

#comments
    border-radius 4
    box-shadow 0 9 1px black

    p
        opacity 0.75

.seeen
    border-radius 4

#slogan
    hide-text()

您可以使用 --watch(或只是 -w)标志:

stylus -u nib -w screen.styl