在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):eriwen/gradle-css-plugin开源软件地址(OpenSource Url):https://github.com/eriwen/gradle-css-plugin开源编程语言(OpenSource Language):JavaScript 88.7%开源软件介绍(OpenSource Introduction):Quick StartManaging 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"
} 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 OptionscombineCss
YUI Compressor)minifyCss (Uses the
gzipCss
less
csslint
What, you want more? Let me know! See AlsoThe Gradle JS Plugin! |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论