Commits

David Carr committed 3b0a004

docs: add readme

Comments (0)

Files changed (2)

+# Overview
+The LESS plugin is a [Gradle](http://www.gradle.org/) plugin for [LESS](http://lesscss.org) files into [CSS](http://www.w3.org/Style/CSS/) files.  It is available for use under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).  If you have any issues, please check the [issue tracker](https://bitbucket.org/davidmc24/gradle-less-plugin/issues?status=new&status=open), and if there isn't anything relevant, submit a new issue.
+
+# Distribution
+The plugin is distributed via [Bintray](https://www.bintray.com/).  If desired, you can use the [Bintray plugin](https://bitbucket.org/davidmc24/gradle-bintray-plugin) to simplify the configuration of Bintray repositories within Gradle build scripts.
+
+# Usage
+To use the plugin, configure your `build.gradle` based the example below.
+
+    :::groovy
+    buildscript {
+        repositories {
+            maven {
+            	name = 'BintrayJCenter'
+            	url = 'http://jcenter.bintray.com'
+            }
+        }
+        dependencies {
+            classpath 'us.carrclan.david.gradle:gradle-less-plugin:VERSION'
+        }
+    }
+    apply plugin: 'less'
+
+# Site Plugin Integration
+
+The LESS plugin integrates with the [Site plugin](https://bitbucket.org/davidmc24/gradle-site-plugin) to provide a useful default configuration if both are applied.
+
+## Project Layout
+
+The LESS plugin assumes the project layout shown below when used with the Site plugin.
+
+Directory       | Meaning
+--------------- | ---------------
+`src/site/less` | Site LESS files
+
+## Tasks
+
+If the Site plugin is applied, the LESS plugin adds a task to your project, as shown below.  Additionally, it adds a dependency on `lessCompileSite` to the `publishSite` task registered by the Site plugin.
+
+Task name         | Depends on | Type        | Description
+----------------- | ---------- | ----------- | -----------------------------
+`lessCompileSite` | -          | LessCompile | Compiles the site LESS files.
+
+### Task Defaults: lessCompileSite
+
+Task Property    | Type      | Default Value
+---------------- | --------- | -----------------------------------
+`sourceDir`      | `Object`  | `"src/site/less"`
+`destinationDir` | `File`    | `"${site.sourceSet.output.resourceDir}/css"`
+`encoding`       | `String`  | None
+`compress`       | `Boolean` | None
+
+# LessCompile
+
+The plugin introduces a new task type, `LessCompile`, which performs LESS compilation using [lesscss-java](https://github.com/marceloverdijk/lesscss-java).
+
+Task Property    | Type      | Description
+---------------- | --------- | ---------------------------------------------------
+`sourceDir`      | `Object`  | The path to the LESS source files to compile.
+`destinationDir` | `File`    | The destination for the compiled CSS files.
+`encoding`       | `String`  | The encoding with with to write the CSS files.
+`compress`       | `Boolean` | Whether to enable the LESS compiler's minification.
 
 Items in this group are either under active development, or will likely be under active development soon.  Most items in this list should make it into the next feature release.
 
-* Write README
-
 ## Soon
 
 Items in this group are not under active development, but are intended to be included in one of the next two feature releases.