I agree with the js packaging.
It works fine for js libs like prototype that is build based on
multiple JS but pakcage as a single file.

It works less with scriptaculous, dojo or yahooUI that comes with
multiple JS with a internal JS-level dependency loading strategy. For
those one, this would require one artifact per js file, and maybe a
parent POM to declare all of them as dependencies.

I'm writing a js:inplace Mojo based on this idea.

Nico.



2007/9/28, Richard Chamberlain <[EMAIL PROTECTED]>:
> This is definitely I'm struggling with at the moment:
>
> We have 2 artefacts for each js module:
>
> 1) one compressed module.js file
> 2) the source in multiple files, containing a module.js that
> document.writes out script tags for each file. This is used for
> debugging.
>
> Currently I package with a zip and a task to unzip when retrieved. I'd
> be interested if this could be made neater.
>
> One option (touched on before on this list) is to only ever produce a
> single .js file for each module and have "js" packaging. Unfortunately
> there would still need to be a copy task to move it from your local
> repository under your web context.
>
> Cheers,
>
> Rich
>
> -----Original Message-----
> From: nicolas de loof [mailto:[EMAIL PROTECTED]
> Sent: 28 September 2007 15:10
> To: Maven Users List
> Subject: recommandation for JS packaging ? (was Using maven for
> JavaScript projects)
>
> What would be the better way to package JS libs ?
>
> - option 1 : use existing WAR packaging with war overlay
>    good : Works today with no change, just requires us to agree on a
> common folder for scripts
>    bad : cannot be used with jetty:run as the weapp is not packaged
>
> - option 2 : use js packaged into a jar, and a custom plugin to unpack.
>    js:inplace to unpack into src/main/webapp, prior to lauching
> jetty:run
>    js:unpack to unpack during the package phase.
>
> - other ?
>
> Nico.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to