7

我正在尝试在手写笔中使用 Nib CSS3 扩展。安装手写笔和笔尖(尝试本地和全球-g)。但是没有一个有效,当我这样做的时候

stylus styles.styl > build/styles.css

# styles.styl
@import "nib"

我明白了

/usr/lib/node_modules/stylus/bin/stylus:502
              throw err;
                    ^
Error: styles.styl:1
 > 1| @import "nib"
   2| 
   3| body 
   4|   background: linear-gradient(top, white, black)

failed to locate @import file nib.styl

    at Evaluator.visitImport (/usr/lib/node_modules/stylus/lib/visitor/evaluator.js:659:21)
    at Evaluator.Visitor.visit (/usr/lib/node_modules/stylus/lib/visitor/index.js:28:40)
    at Evaluator.visit (/usr/lib/node_modules/stylus/lib/visitor/evaluator.js:75:18)
    at Evaluator.visitRoot (/usr/lib/node_modules/stylus/lib/visitor/evaluator.js:521:27)
    at Evaluator.Visitor.visit (/usr/lib/node_modules/stylus/lib/visitor/index.js:28:40)
    at Evaluator.visit (/usr/lib/node_modules/stylus/lib/visitor/evaluator.js:75:18)
    at Evaluator.evaluate (/usr/lib/node_modules/stylus/lib/visitor/evaluator.js:150:15)
    at Renderer.render (/usr/lib/node_modules/stylus/lib/renderer.js:69:26)
    at /usr/lib/node_modules/stylus/bin/stylus:496:15
    at fs.readFile (fs.js:176:14)
4

2 回答 2

5

是的,我想我错过了-u@Jonathan 指出的标志

于 2012-08-19T07:24:19.407 回答
0

自动转换的完整代码行将是:

stylus -w -u nib test.styl -o test.css
于 2020-03-18T20:39:14.197 回答