Sublime Forum

Build System that includes ">"

#1

Hi there,
i’m just trying to get a build system working that uses browserify and minifies the output. Ive tried these suggestions including minifyify but couldn’t get it working

example minifyify command:
"cmd": ["browserify", "$file", "-d", "-p", "[minifyify --map $file.js.map --output $file.js.map] > $file.dist.js", "--no-color"]

the error is always “Cannot find module xxx” where xxx is some part of the command array (not the actual command)

0 Likes

#2

I don’t think you’re using browserify’s -p option right. Either way, if you want to use shell features in a build command (the > file pipe is a shell feature), you have to use the "shell_cmd": "cmd be here" key and define a string (remember to escape quotes in a json string), not "cmd".

1 Like

#3

Awesome, that is exactly what i needed! Thank you very much!

0 Likes