• This repository has been archived on 17/Jul/2022
  • Stars
    star
    127
  • Rank 282,790 (Top 6 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created about 13 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Gradle plugin for working with CSS

This plugin is no longer maintained!

Gradle CSS Plugin

Managing your CSS in a Gradle build is super easy now! Just add this to your build.gradle file:

Gradle 2.1+

plugins {
  id "com.eriwen.gradle.css" version "2.14.0"
}

Gradle 2.0-

// Grab the plugin from a Maven Repo automatically
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.eriwen:gradle-css-plugin:1.11.0'
    }
}

// Invoke the plugin
apply plugin: 'css'

// Declare your sources
css.source {
    dev {
        css {
            srcDir "app/styles"
            include "*.css"
            exclude "*.min.css"
        }
    }
}

// Specify a collection of files to be combined, then minified and finally GZip compressed.
combineCss {
    source = css.source.dev.css.files
    dest = "${buildDir}/all.css"
}

minifyCss {
    source = combineCss
    dest = "${buildDir}/all-min.css"
    yuicompressor { // Optional
        lineBreakPos = -1
    }
}

gzipCss {
    source = minifyCss
    dest = "${buildDir}/all.2.0.4.css"
}

LESS Support

css.source {
    dev {
        css {
            srcDir "app/styles"
            include "*.less"
        }
    }
}

lesscss {
    source = css.source.dev.css.asFileTree
    dest = "${buildDir}/styles"
}

Supports CSS Lint v0.9.10

csslint {
    source = css.source.dev.css.files
    dest = "${buildDir}/csslint.out"
}

Available Tasks and Options

combineCss

  • source = Collection of file paths of files to merge
  • dest = File/String Path for combined output

minifyCss (Uses the YUI Compressor)

  • source = File to minify
  • dest = File for minified output
  • (Optional) yuicompressor.lineBreakPos = -1 (default) Insert a line break after the specified column number

gzipCss

  • source = File to compress
  • dest = File/String path for compressed output

less

  • source = Files to transpile
  • dest = File/String output directory

csslint

  • source = Collection of file paths of files to analyze
  • dest = File for output
  • (Optional) format = 'compact' (default), 'text', 'lint-xml', or 'checkstyle-xml'
  • (Optional) warnings = (default is all) Collection of string ids for checks. Try csslint --list-rules to see all possible IDs
  • (Optional) errors = (default is none) Collection of string ids for checks. CAUTION: These cause a non-zero exit code and fail the build!

What, you want more? Let me know!

See Also

The Gradle JS Plugin!

More Repositories

1

gradle-js-plugin

Gradle plugin for working with JS
JavaScript
381
star
2

lcov-to-cobertura-xml

Converts lcov output to Cobertura-compatible XML for CI
Python
185
star
3

smap.js

A forward polyfill for ES6 Maps/Awesome Map util methods
JavaScript
50
star
4

dotfiles

System config
Shell
30
star
5

es6-map-shim

Implements the evolving ES6 Map specification as closely as possible
JavaScript
23
star
6

cheqlist

Desktop application for Remember The Milk (SHUT DOWN)
Java
20
star
7

gradle-cobertura-plugin

Gradle plugin for Cobertura
Groovy
19
star
8

kanban

Simple kanban board backed by MongoDB, jade, stylus and mocha
JavaScript
17
star
9

groovyrtm

Groovy API for Remember The Milk (DEPRECATED)
Groovy
13
star
10

brunch-jade-bootstrap-and-coffee

Brunch skeleton including Bootstrap, SASS, Jade and CoffeeScript
CoffeeScript
13
star
11

eriwen.com

Eric Wendelin's blog at eriwen.com
CSS
7
star
12

gradle-digest-plugin

Digest sources to allow identification of files by their content
Kotlin
7
star
13

hadoop-examples

Hadoop code examples for training purposes
Java
5
star
14

thumbs

Simple team-based rating application written in node.js
JavaScript
4
star
15

flot-plugins

Plugins for Flot, a Javascript charting library
JavaScript
4
star
16

brunch-notes-example

Simple notes app demonstrating features of Brunch
CoffeeScript
4
star
17

griffon-jython

Jython plugin for Griffon
Groovy
3
star
18

eriwen.com-v3

Relevant sourcecode for the old WordPress version of eriwen.com
JavaScript
3
star
19

kanban-coffee

Kanban board written in NodeJS, CoffeeScript, Jade, Stylus, and Mocha
CoffeeScript
3
star
20

dashpebble

Pebble watch face modeled after DashClock for Android
C
2
star
21

coffee-script-source-maps-ftw

Coffee Script Source Maps FTW!
Ruby
2
star
22

github-launch-bookmark

Access GitHub from a single search box supercharged with command line power.
1
star
23

gradle-summit-2017-demo

CSS
1
star
24

gradle-node-playground

Playing around with node stuff and Gradle
JavaScript
1
star
25

ml-flower-recognition

Identify flower species from photos using a neural network
HTML
1
star
26

udacity-mldevops-exercise3

Jupyter Notebook
1
star
27

eriwen

About Eric Wendelin
1
star