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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -