集成yuicompressor实现(CSS/JS压缩)

pull/274/head^2
RuoYi 2021-05-27 09:15:14 +08:00
parent 387a3f838d
commit 2abe93d45b
5 changed files with 41 additions and 4 deletions

View File

@ -106,7 +106,39 @@
<failOnMissingWebXml>false</failOnMissingWebXml> <failOnMissingWebXml>false</failOnMissingWebXml>
<warName>${project.artifactId}</warName> <warName>${project.artifactId}</warName>
</configuration> </configuration>
</plugin> </plugin>
<!-- YUI Compressor (CSS/JS压缩)
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<encoding>UTF-8</encoding>
<jswarn>false</jswarn>
<nosuffix>true</nosuffix>
<linebreakpos>50000</linebreakpos>
<sourceDirectory>src/main/resources/static</sourceDirectory>
<force>true</force>
<includes>
<include>**/*.js</include>
<include>**/*.css</include>
</includes>
<excludes>
<exclude>**/*.min.js</exclude>
<exclude>**/*.min.css</exclude>
<exclude>**/fileinput.js</exclude>
<exclude>**/bootstrap-treetable.js</exclude>
</excludes>
</configuration>
</plugin> -->
</plugins> </plugins>
<finalName>${project.artifactId}</finalName> <finalName>${project.artifactId}</finalName>
</build> </build>

File diff suppressed because one or more lines are too long

View File

@ -31,7 +31,7 @@
<script th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script> <script th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
<script th:src="@{/ajax/libs/validate/jquery.validate.extend.js}"></script> <script th:src="@{/ajax/libs/validate/jquery.validate.extend.js}"></script>
<!-- jquery-validate 表单树插件 --> <!-- jquery-validate 表单树插件 -->
<script th:src="@{/ajax/libs/bootstrap-treetable/bootstrap-treetable.js}"></script> <script th:src="@{/ajax/libs/bootstrap-treetable/bootstrap-treetable.min.js?v=20210526}"></script>
<!-- 遮罩层 --> <!-- 遮罩层 -->
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script> <script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script> <script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
@ -157,7 +157,7 @@
<!-- ECharts百度统计图表插件 --> <!-- ECharts百度统计图表插件 -->
<div th:fragment="echarts-js"> <div th:fragment="echarts-js">
<script th:src="@{/ajax/libs/report/echarts/echarts-all.js}"></script> <script th:src="@{/ajax/libs/report/echarts/echarts-all.min.js}"></script>
</div> </div>
<!-- peity图表组合插件 --> <!-- peity图表组合插件 -->
@ -172,7 +172,7 @@
<!-- 表格行拖拽插件 --> <!-- 表格行拖拽插件 -->
<div th:fragment="bootstrap-table-reorder-js"> <div th:fragment="bootstrap-table-reorder-js">
<script th:src="@{/ajax/libs/bootstrap-table/extensions/reorder/bootstrap-table-reorder.js}"></script> <script th:src="@{/ajax/libs/bootstrap-table/extensions/reorder/bootstrap-table-reorder.min.js}"></script>
<script th:src="@{/ajax/libs/bootstrap-table/extensions/reorder/jquery.tablednd.js}"></script> <script th:src="@{/ajax/libs/bootstrap-table/extensions/reorder/jquery.tablednd.js}"></script>
</div> </div>