YuiCompress静的リソース圧縮の詳細

11456 ワード

<plugin>
    
    <groupId>net.alchim31.mavengroupId>
    <artifactId>yuicompressor-maven-pluginartifactId>
    <version>1.5.1version>
    <executions>
        <execution>
            <id>compress1id>
            <phase>compilephase>
            <goals>
                <goal>compressgoal>
            goals>
            <configuration>
                
                <encoding>UTF-8encoding>
                
                <jswarn>falsejswarn>
                
                <force>falseforce>
                
                <linebreakpos>-1linebreakpos>
                
                <preProcessAggregates>falsepreProcessAggregates>
                
                <skip>falseskip>
                
                <nosuffix>truenosuffix>
                
                <suffix>.minsuffix>
                
                <sourceDirectory>${webAppPath}/static/assetssourceDirectory>
                
                <includes>
                    <include>js/**/*.jsinclude>
                    <include>css/**/*.cssinclude>
                includes>
                <excludes>
                    <exclude>**/*bak.jsexclude>
                    <exclude>**/*min.jsexclude>
                    <exclude>**/*min.cssexclude>
                excludes>
                
                <outputDirectory>${webAppPath}/release/assets_tmpoutputDirectory>
            configuration>
        execution>
        
        <execution>
            <id>compress2id>
            <phase>process-classesphase>
            <goals>
                <goal>compressgoal>
            goals>
            <configuration>
                
                <encoding>UTF-8encoding>
                
                <jswarn>falsejswarn>
                
                <force>falseforce>
                
                <linebreakpos>-1linebreakpos>
                
                <preProcessAggregates>falsepreProcessAggregates>
                
                <skip>falseskip>
                
                <nosuffix>truenosuffix>
                
                <suffix>.minsuffix>
                
                <sourceDirectory>${webAppPath}sourceDirectory>
                
                <includes>
                    <include>static/jssrc/**/*.jsinclude>
                    <include>h5/**/*.jsinclude>
                includes>
                
                <excludes>
                    <exclude>**/*bak.jsexclude>
                    <exclude>**/*min.jsexclude>
                    <exclude>**/*min.cssexclude>
                excludes>
                
                <outputDirectory>${webAppPath}/releaseoutputDirectory>
                
                
            configuration>
        execution>
    executions>
plugin>