Thymeleaf JAWR Extension

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Лицензия

Лицензия

Категории

Категории

Leaf Данные Базы данных
Группа

Группа

com.github.dtrunk90
Идентификатор

Идентификатор

thymeleaf-jawr-extension
Последняя версия

Последняя версия

2.0.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

Thymeleaf JAWR Extension
Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Ссылка на сайт

Ссылка на сайт

https://github.com/dtrunk90/thymeleaf-jawr-extension
Система контроля версий

Система контроля версий

http://github.com/dtrunk90/thymeleaf-jawr-extension

Скачать thymeleaf-jawr-extension

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.dtrunk90/thymeleaf-jawr-extension/ -->
<dependency>
    <groupId>com.github.dtrunk90</groupId>
    <artifactId>thymeleaf-jawr-extension</artifactId>
    <version>2.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.dtrunk90/thymeleaf-jawr-extension/
implementation 'com.github.dtrunk90:thymeleaf-jawr-extension:2.0.3'
// https://jarcasting.com/artifacts/com.github.dtrunk90/thymeleaf-jawr-extension/
implementation ("com.github.dtrunk90:thymeleaf-jawr-extension:2.0.3")
'com.github.dtrunk90:thymeleaf-jawr-extension:jar:2.0.3'
<dependency org="com.github.dtrunk90" name="thymeleaf-jawr-extension" rev="2.0.3">
  <artifact name="thymeleaf-jawr-extension" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.dtrunk90', module='thymeleaf-jawr-extension', version='2.0.3')
)
libraryDependencies += "com.github.dtrunk90" % "thymeleaf-jawr-extension" % "2.0.3"
[com.github.dtrunk90/thymeleaf-jawr-extension "2.0.3"]

Зависимости

provided (6)

Идентификатор библиотеки Тип Версия
javax.servlet : javax.servlet-api jar 3.1.0
javax.servlet.jsp : jsp-api jar 2.2
net.jawr : jawr-core jar 3.9
org.springframework : spring-webmvc jar 5.0.5.RELEASE
org.springframework.boot : spring-boot-autoconfigure jar 2.0.1.RELEASE
org.thymeleaf : thymeleaf jar 3.0.9.RELEASE

test (5)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
net.jawr.extensions : jawr-spring-extension jar 3.9
org.springframework : spring-test jar 5.0.5.RELEASE
org.thymeleaf : thymeleaf-spring5 jar 3.0.9.RELEASE
org.thymeleaf : thymeleaf-testing jar 3.0.3.RELEASE

Модули Проекта

Данный проект не имеет модулей.

Thymeleaf Jawr Extension

<dependency>
	<groupId>com.github.dtrunk90</groupId>
	<artifactId>thymeleaf-jawr-extension</artifactId>
	<version>2.0.3</version>
</dependency>

Attributes

All attributes need to be prefixed by jawr:.
To avoid IDE warnings you can add the namespace as follows:

<html xmlns:jawr="http://jawr.java.net" xmlns:th="http://www.thymeleaf.org"></html>

Javascript attributes:

Attribute name Type Purpose Default value
src String The bundle path.
useRandomParam Boolean The flag indicating if we must use random parameter in debug mode. true
async Boolean The async flag. false
defer Boolean The defer flag. false
type String The type attribute. text/javascript
crossorigin String The crossorigin attribute.

CSS attributes:

Attribute name Type Purpose Default value
href String The bundle path.
media String The media attribute of the stylesheet. screen
title String The title to use for the style.
useRandomParam Boolean The flag indicating if we must use random parameter in debug mode. true
alternate Boolean This flag is used to render link as an alternate style. false
displayAlternate Boolean This flag is used to render the skin variants of the CSS bundle as alternate style. false

Expression object #jawr

${#jawr.imagePath(String src)}						// base64 defaults to false
${#jawr.imagePath(String src, boolean base64)}

It's important to note that Jawr will generate the base64 encoded image for all browsers except IE6 and IE7, which doesn't handle base64 encoded images.

Usage examples

Javascript bundle:

<script type="text/javascript" src="jquery.min.js" jawr:src="/lib.js"></script>

CSS bundle:

<link rel="stylesheet/less" type="text/css" href="main.less" jawr:href="/all.css" />

Image:

<img src="../resources/img/dummy.png" alt="" th:src="${#jawr.imagePath('/resources/img/dummy.png')}" />

Image input:

<input type="image" src="../resources/img/dummy.png" th:src="${#jawr.imagePath('/resources/img/dummy.png')}" />

You can use expressions as well:

<script type="text/javascript" src="index.js" jawr:src="|/${pageName}.js|"></script>

Версии библиотеки

Версия
2.0.3
2.0.2
2.0.1
2.0.0
2.0.0.BETA02
2.0.0.BETA01
1.2.1
1.2.0
1.1.2
1.1.1
1.1.0
1.0.3
1.0.2
1.0.1
1.0.0