I have two js files:
1.js
(function(){
function setLength(a,len){
a.length=len;
}
...........
})();
2.js:
function View(){
setLength(this,3);
}
Note,the 2.js
will access the method (setLength
) defined in 1.js
.
So I want the compiler compile these two files using the same replacement.
I want this kind of result:
(function(){
function x(a,b){
a.length=b;
}
...........
})();
function View(){
x(this,3);
}
Is this possible?
BTW,I use the compiler.js to compile the files:
java -jar compiler.jar --js file.js --js_output_file file.min.js
This is the single file,I want to compile more than one file and each have its own output file,something like this:
java -jar compiler.jar --js file.js,file2.js --js_output_file file.min.js,file2.min.js