Just a quick update.
I've got the 2 main features I wanted done. This is the filtering and
combining of javascript files.
By default, the plugin will filter js files by removing all lines starting
with ';;;', and will combine javascript files together via a
[comment]<{subFile.js}[/comment] syntax.
Eg. Given the following Javascript file:
[code src="src/main/javascript/MyProject.js"]
function MyProject() {
;;; alert("MyProject called");
;;; console.log("MyProject called");
this.version = 1.0;
}
//<{subFile.js,subFile2.js}//
/*<{
subDirectory/subFile3.js,
subDirectory/subDirectory2/subFile4.js
}*/
[/code]
Will result in a single Javascript file:
[code src="build/classes/main/MyProject.js"]
function MyProject() {
this.version = 1.0;
}
var subFile = "This content was in subFile.js";
var subFile2 = "This content was in subFile2.js";
function subFile3() {
return "This content was in subDirectory/subFile3.js";
}
function subFile4() {
return "This content was in subDirectory/subDirectory/subFile4.js";
}
[/code]
I've also moved the project to a top level project in LaunchPad:
https://launchpad.net/gradle-jslib
Source can be checked out with Bazaar via:
bzr branch lp:~elberry/gradle-jslib/main
The next steps include adding support for popular Javascript minifiers like
YUI Compressor, and Google Closure Compiler. Then support for Javascript
unit testing frameworks like JSUnit, or QUnit.
Thanks for all the help.
Cheers,
Eric
--
Learn from the past. Live in the present. Plan for the future.
Blog: http://www.townsfolkdesigns.com/blogs/elberry
jEdit <http://www.jedit.org> - Programmer's Text Editor
Bazaar <http://bazaar.canonical.com> - Version Control for Humans