[
https://jira.codehaus.org/browse/MWEBMINI-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=293199#comment-293199
]
Pap Lőrinc commented on MWEBMINI-4:
----------------------------------------
The plugin declaration might look like this:
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>webminifier-maven-plugin</artifactId>
<version>2.0.0</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>minify-js</goal>
</goals>
</execution>
</executions>
<configuration>
<jsCompressorType>CLOSURE</jsCompressorType>
<closureCompilationLevel>ADVANCED_OPTIMIZATIONS</closureCompilationLevel>
<sourceDirectory>.</sourceDirectory>
<destinationDirectory>target/min</destinationDirectory>
<htmlIncludes>
<htmlInclude>login.html</htmlInclude>
<htmlInclude>index.html</htmlInclude>
</htmlIncludes>
<externNamespaces>
<externNamespace>Ext</externNamespace>
<externNamespace>tinymce</externNamespace>
</externNamespaces>
<isDebug>false</isDebug>
<removeAllUnreferencedResources>true</removeAllUnreferencedResources>
<header>
/*****************************************************************
* Copyright © ..
*****************************************************************/
</header>
</configuration>
</plugin>
and the css and js tags with splitpoints, like this:
<link rel="stylesheet" type="text/css"
href="lib/ejschart/dist/EJSChart.css" id="EJSChart.css"/>
<script type="text/javascript" src="lib/ejschart/src/EJSChart_source.js"
id="EJSChart"></script>
<script type="text/javascript"
src="lib/ejschart/src/EJSChart_Gauges_source.js"></script>
<script type="text/javascript"
src="lib/ejschart/src/EJSChart_SVGExport_source.js"></script>
Lőrinc
> New minifier
> ------------
>
> Key: MWEBMINI-4
> URL: https://jira.codehaus.org/browse/MWEBMINI-4
> Project: Mojo Web Minifier Maven Plugin
> Issue Type: New Feature
> Reporter: Pap Lőrinc
> Attachments: compression.zip
>
>
> I rewrote most of the code.
> Now it will minify the css files also and use the existing tags from the
> html, instead of creating new ones, preserving the script declarations in the
> head and body. It minimized the html file also, removing comments and spaces.
> Split points are now created according to the tag's ID attribute.
> The closure javascript minifier searches for function names in strings that
> shouldn't be replaced (needed the rhino parser for that, which had a
> hexadecimal parsing bug, that's why I have included it in the code) and adds
> other externs also for the advanced compilation.
> The CSS minifier changes the relative paths when merged (since relative paths
> a relative to the file itself, which changes, once merged) and warns for
> nonexistent paths etc.
> And other minor and major changes.
> The code still needs some generalization and changes:
> Javascript property renaming should be enableable in the advanced phase
> YUI CSS minifier should also be added as an option
> the yui and closure options should be separated and if the same css and
> javascript files are included in different HTML files, they should be
> resolved, not compressed in a different file
> the compression shouldn't run if the parent directory's modified date
> didn't change.
> tests
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email