Sublime Forum

Build System Woes + Noob

#1

I have the following build system setup for javascript files:

{
   "selector": "source.js",
   "cmd": [
      "/usr/bin/uglifyjs",
      "$file",
      "--compress --mangle --output",
      "$file_path/$file_base_name.min.js"
   ]
}

The correct output from uglifyjs is showing up in the result pane in Sublime Text 3, but it’s not being output to the destination file.

I’m sure I’m missing something obvious, but any help would be appreciated :slight_smile:

Bill

0 Likes

#2

cmd expects that each item in the list is a separate argument to the command that’s being executed (which is the first item in the list). Your build is specifying three arguments in one so that might be confusing the tool.

Splitting them up into separate strings might help.

1 Like

#3

Yep, that was it! Thank you :slight_smile:

1 Like