Gradle Dust.js Plugin

A Gradle plugin for compiling Dust.js files.

Лицензия

Лицензия

Категории

Категории

JavaScript Языки программирования Gradle Компиляция и сборка
Группа

Группа

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

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

gradle-dustjs-plugin
Последняя версия

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

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Gradle Dust.js Plugin
A Gradle plugin for compiling Dust.js files.
Ссылка на сайт

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

https://github.com/davidzchen/gradle-dustjs-plugin
Система контроля версий

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

https://github.com/davidzchen/gradle-dustjs-plugin

Скачать gradle-dustjs-plugin

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

<!-- https://jarcasting.com/artifacts/com.linkedin/gradle-dustjs-plugin/ -->
<dependency>
    <groupId>com.linkedin</groupId>
    <artifactId>gradle-dustjs-plugin</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.linkedin/gradle-dustjs-plugin/
implementation 'com.linkedin:gradle-dustjs-plugin:1.0.0'
// https://jarcasting.com/artifacts/com.linkedin/gradle-dustjs-plugin/
implementation ("com.linkedin:gradle-dustjs-plugin:1.0.0")
'com.linkedin:gradle-dustjs-plugin:jar:1.0.0'
<dependency org="com.linkedin" name="gradle-dustjs-plugin" rev="1.0.0">
  <artifact name="gradle-dustjs-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.linkedin', module='gradle-dustjs-plugin', version='1.0.0')
)
libraryDependencies += "com.linkedin" % "gradle-dustjs-plugin" % "1.0.0"
[com.linkedin/gradle-dustjs-plugin "1.0.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.mozilla : rhino jar 1.7R4

test (1)

Идентификатор библиотеки Тип Версия
org.spockframework : spock-core jar 0.6-groovy-1.8

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

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

Gradle Dust.js Plugin Build Status

A Gradle plugin that compiles templates. This plugin requires LinkedIn Dust.js and uses Rhino to run the Dust compiler.

Usage

Add the plugin

Add a buildscript dependency on the plugin to pull the artifact for the plugin:

buildscript {
  repositories {
    mavenCentral()
  }
  dependencies {
    classpath 'com.linkedin:gradle-dustjs-plugin:1.0.0'
  }
}

Apply the plugin

apply plugin: 'dustjs'

Configure the Plugin

dustjs {
  source = fileTree('src/main/tl') {
    include 'template.tl'
  }
  dest = 'src/main/webapp/assets/js'
}

Tasks

This plugin adds the dustjs task and the implicit cleanDustjs task.

dustjs

The dustjs task compiles the specified Dust .tl files from the source directory into .js files into the dest directory.

The basename of the template file is used as the template name. For example, if one of the files to be compiled is template.tl, then running the plugin is equivalent to the following dustc invocation:

$ dustc --name=template source/template.tl dest/template.js

cleanDustjs

The cleanDustjs task completely deletes the dest directory.

Acknowledgements

This plugin makes use of code adapted from Oliver Becker's Gradle LESS plugin and Jonathan Parsons' Play Framework Dust.js plugin.

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

Версия
1.0.0