Skip to content

Commit

Permalink
removed broken less-rhino-1.4.0.js - see also less/less.js#1405 and l…
Browse files Browse the repository at this point in the history
  • Loading branch information
obecker committed Sep 6, 2013
1 parent 4d50d6c commit 3059896
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4,289 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Gradle LessCss Plugin [![Build Status](https://travis-ci.org/obecker/gradle-lesscss-plugin.png?branch=master)](https://travis-ci.org/obecker/gradle-lesscss-plugin)

A gradle plugin that compiles [LESS](http://lesscss.org) files to CSS. Version 1.0-1.3.3 of the plugin uses LESS version 1.3.3.
A gradle plugin that compiles [LESS](http://lesscss.org) files to CSS.

This plugin helps to you to integrate the processing of LESS files into your automated build process without the need of installing node.js
on the build server or adding the compiled CSS files to your version control system.

## Versions

* Version 1.0-1.3.3 of the plugin uses LESS version 1.3.3.
* Version 1.1-1.3.3 of the plugin _(not released yet)_ enables you to choose from LESS versions 1.1.3, 1.1.5, 1.3.1, 1.3.2, 1.3.3.


## Usage
Expand Down Expand Up @@ -82,11 +86,12 @@ source files, thus compiling `style.less` results in `style.css` in the `dest` d
when set to `true` turns on compression of the created CSS files.

* `lessVersion` (optional, defaults to `1.3.3`)
set the LESS version for compiler. supported versions are `1.1.3`, `1.1.5`, `1.3.1`, `1.3.2`,`1.3.3`, `1.4.0`.
set the LESS version for compiler. supported versions are `1.1.3`, `1.1.5`, `1.3.1`, `1.3.2`, `1.3.3`.

## Acknowledgments

Main parts of the build configuration as well as two classes for running JS scripts with Rhino have been taken from Eric Wendelin's great
[gradle-js-plugin](https://github.com/eriwen/gradle-js-plugin). Without his work the development of this plugin would have taken much longer (or would
have possibly not even succeeded). Thanks Eric!

Support for `lessVersion` has been added by Alex Ley.
7 changes: 4 additions & 3 deletions src/main/groovy/de/obqo/gradle/lesscss/LessTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import org.slf4j.LoggerFactory
* Implementation class for the <code>lesscss</code> task.
*
* @author Oliver Becker
* @author Alex Ley
* @since 17.02.13
*/
class LessTask extends DefaultTask {
Expand All @@ -45,7 +46,7 @@ class LessTask extends DefaultTask {

private static final String LESS_PATH_PREFIX = 'less-rhino-'
private static final String LESS_PATH_SUFFIX = '.js'
private static final List<String> LESS_VERSIONS = ['1.1.3', '1.1.5', '1.3.1', '1.3.2','1.3.3', '1.4.0']
private static final List<String> LESS_VERSIONS = ['1.1.3', '1.1.5', '1.3.1', '1.3.2', '1.3.3']
private static final String LESS_DEFAULT_VERSION = LESS_VERSIONS[4]
private static final String TMP_DIR = "tmp${File.separator}js"

Expand Down Expand Up @@ -99,12 +100,12 @@ class LessTask extends DefaultTask {
@Input
boolean compress = false

/** Set the version of the less compiler, supported versions <code>1.1.3, 1.1.5, 1.3.1, 1.3.2 ,1.3.3, 1.4.0</code> */
/** Set the version of the less compiler, supported versions <code>1.1.3, 1.1.5, 1.3.1, 1.3.2, 1.3.3</code> */
@Input
String lessVersion = LESS_DEFAULT_VERSION

String getLessPath() {
if( ! (lessVersion in LESS_VERSIONS)){
if (!(lessVersion in LESS_VERSIONS)) {
throw new InvalidUserDataException("Unsupported less compiler version for property lessVersion. Supported versions $LESS_VERSIONS")
}
//build the filepath for the less js file
Expand Down
Loading

0 comments on commit 3059896

Please sign in to comment.