When using Google Closure Builder, can I use my existing deps.js file instead of tracing paths?

112 views Asked by At

I am trying to reduce my build time while using closureBuilder. I am also using the closureDepsWriter tool to generate a deps.js file, and this task is very quick. I can see that closureBuilder traces ~1500 sources, even though I only have a few hundred in my source directory. So, considering that closureDepsWriter is able to quickly generate a dependency tree , is it possible to use this tree as input into closureBuilder? I would like to avoid writing a custom concatenation tool that reads from deps.js.

I have looked through the closureBuilder documentation to see if there are any command line options that would allow this, but I am coming up blank.

1

There are 1 answers

1
Chad Killingsworth On

All of the python scripts you mentioned (depswriter, closurebuilder) are no longer the best way to compile scripts. Instead, utilize the ability to pass globs to closure-compiler and use the --manage-closure-dependencies related flags. See https://github.com/google/closure-compiler/wiki/Manage-Closure-Dependencies

Example:

java -jar compiler.jar -O=ADVANCED -W=VEBOSE --only_closure_dependencies
  --closure_entry_point=foo.bar --js='closure-library/**.js' --js='mycoderoot/**.js'