javascript - Google Closure Compiler Includes -


i've been using google closure compiler little bit projects, it's awesome!

i've been trying find out whether or not can "includes" in javascript file includes other javascript files. i'm trying have 1 javascript file "includes" files need compiles, can less import statement, ("@import "../less/bootstrap") example.

is possible? - or have provide list of source files @ time of compilation in command line?

many thanks!

when using closure-library

"includes" handled via goog.require calls. see https://developers.google.com/closure/library/docs/tutorial#zippy

in un-compiled code, included scripts dynamically inserted. during compilation, compiler include necessary scripts , dead-code elimination remove unused methods , symbols.

other options

the popular option handling javascript includes/dependencies requirejs. requirejs dynamic script insertion. closure-compiler has common js pass translates requirejs require calls goog.require calls compiler can include them directly during compilation.


Comments

Popular posts from this blog

Need help in packaging app using TideSDK on Windows -

java - Why does my date parsing return a weird date? -