I'd like to compile my Stylus files with a Visual Studio Code task, but the command requires stdin/stdout redirection (with < and >):
stylus --compress < main.styl > main.css
This doesn't work as the behavior seems different from the shell.
Try
{
"version": "0.1.0",
"tasks": [
{
"taskName": "styles",
"isBuildCommand": true,
"isShellCommand": true,
"echoCommand": true,
"command": "stylus",
"args": [
"--compress",
"<",
"main.styl",
">",
"main.css"
]
}
]
}
Catch
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 '<'