I have folder structure like this:
js_uncompressed
> lib
> libraries which all js files should include.
> common
> files which some js files should include
> folder1
> screenA.js
> screenB.js
> folder2
> screenC.js
and I want to build on javascript files for each screen[-something].js.
for example,
screenA.js should include files in “lib” folder, fileA.js in “common” folder.
screenB.js should include files in “lib” folder, fileB.js in “common” folder.
screenC.js should include files in “lib” folde, fileA.js and fileB.js in “common” folder.
is this possible without some complicated shell script?
If you can use Ant you can build this easily using Google Closure Compiler. This is just an example that you can start.
I took this code snipet from a project that I maintain. It was created in NetBeans, but you can modify it easily to fit your needs. Values like
${build.classes.dir}are specific of NetBeans build file. This build file creta some references (closure compiler jar, folders, etc.) and executes the “compilation” calling the compiler throughjavatask.