-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.idea/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# lasso-clean-css | ||
|
||
This is a plugin for Lasso which can be used to minify CSS using clean-css. | ||
Plugin for [Lasso.js](https://github.com/lasso-js/lasso) that adds support for minifying CSS using [clean-css](https://github.com/jakubpawlowicz/clean-css). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
var CleanCSS = require('clean-css'); | ||
|
||
function minify(src, options) { | ||
if (!options) { | ||
options = {}; | ||
} | ||
return new CleanCSS(options).minify(src).styles; | ||
} | ||
|
||
exports = module.exports = function (lasso, config) { | ||
lasso.addTransform({ | ||
contentType: 'css', | ||
name: module.id, | ||
stream: false, | ||
transform: function (code) { | ||
return minify(code, config); | ||
} | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
{ | ||
"name": "lasso-clean-css", | ||
"version": "0.0.1", | ||
"description": "Lasso plugin to minify CSS using clean-css", | ||
"keywords": ["lasso", "plugin", "minify", "minifier", "clean-css"], | ||
"description": "Lasso.js plugin to minify CSS using clean-css", | ||
"keywords": [ | ||
"lasso", | ||
"plugin", | ||
"minify", | ||
"minifier", | ||
"css", | ||
"clean-css" | ||
], | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
|
@@ -15,5 +22,8 @@ | |
"name": "Yoni Medoff", | ||
"email": "[email protected]" | ||
}, | ||
"license": "ISC" | ||
"license": "ISC", | ||
"dependencies": { | ||
"clean-css": "^3.3.6" | ||
} | ||
} |