On 28/08/10 7:15 AM, Eric Berry wrote:
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
This is excellent stuff.
Could you perhaps add your plugin to the plugins wiki page:
http://docs.codehaus.org/display/GRADLE/Plugins
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz