javascript - How to use the Closure Compiler File Watcher in PHP Storm -


i trying google's closure compiler work php storm minifying javascript files.

i'm not quite sure i'm doing wrong trying work , can't find guides/tutorials on web anywhere other php storm's own docs, aren't specific enough.

i installed closure compiler using "npm install -g closurecompiler"

it placed here: "/usr/local/bin/ccjs" (alias of "/usr/local/lib/node_modules/closurecompiler/bin/ccjs")

i created file watcher in php storm so:

enter image description here

link image

now when save js file following error:

/usr/local/bin/ccjs --compilation_level simple_optimizations --js common.js

illegal source file after options: simple_optimizations

process finished exit code 3

with or without simple_optimizations option gives error.

presumably can't locate file i'm working with, possibly because of path it's working from. question very, simple, how specify correct path?

i have tried specifying exact path (and verified correct) same error.

-compilation_level simple_optimizations --js $projectfiledir$/public/themes/v2/js/$filename$

for comparison works less file watcher without problem, thought $filename$ work without issue.

--no-color --clean-css $filename$

correct npm module https://www.npmjs.com/package/google-closure-compiler (npm google-closure-compiler -g).

but can run compiler.jar installed closurecompiler directly (usually node_modules/closurecompiler/compiler/compiler.jar) specifying full path jar program.

program: path/to/jar/compiler.jar arguments: --compilation_level simple_optimizations --js $filename$ 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -