我想用 Visual Studio Code 任务编译我的 Stylus 文件,但该命令需要 stdin/stdout 重定向(使用<
and >
):
stylus --compress < main.styl > main.css
这不起作用,因为行为似乎与外壳不同。
尝试
{
"version": "0.1.0",
"tasks": [
{
"taskName": "styles",
"isBuildCommand": true,
"isShellCommand": true,
"echoCommand": true,
"command": "stylus",
"args": [
"--compress",
"<",
"main.styl",
">",
"main.css"
]
}
]
}
抓住
running command$ stylus --compress < main.styl > main.css
/usr/local/lib/node_modules/stylus/bin/stylus:641
if (err) throw err;
^
Error: ENOENT: no such file or directory, stat '<'