mirror of
https://github.com/less/less.js.git
synced 2026-02-09 14:35:44 -05:00
move cleancss into lessc bin only
This commit is contained in:
@@ -69,11 +69,9 @@ var evalCopyProperties = [
|
||||
'silent', // whether to swallow errors and warnings
|
||||
'verbose', // whether to log more activity
|
||||
'compress', // whether to compress
|
||||
'yuicompress', // whether to compress with the outside tool yui compressor
|
||||
'ieCompat', // whether to enforce IE compatibility (IE8 data-uri)
|
||||
'strictMath', // whether math has to be within parenthesis
|
||||
'strictUnits', // whether units need to evaluate correctly
|
||||
'cleancss', // whether to compress with clean-css
|
||||
'sourceMap', // whether to output a source map
|
||||
'importMultiple', // whether we are currently importing multiple copies
|
||||
'urlArgs', // whether to add args into url tokens
|
||||
|
||||
@@ -44,8 +44,6 @@ return {
|
||||
alwaysMakePathsAbsolute: function alwaysMakePathsAbsolute() {
|
||||
return true;
|
||||
},
|
||||
getCleanCSS: function () {
|
||||
},
|
||||
supportsDataURI: function() {
|
||||
return false;
|
||||
},
|
||||
|
||||
@@ -23,9 +23,6 @@ module.exports = {
|
||||
readFileSync: function (filename) {
|
||||
return require("fs").readFileSync(filename);
|
||||
},
|
||||
getCleanCSS: function() {
|
||||
return require('clean-css');
|
||||
},
|
||||
getPath: function (env, filename) {
|
||||
var j = filename.lastIndexOf('/');
|
||||
if (j < 0) {
|
||||
|
||||
@@ -176,21 +176,7 @@ var Parser = function Parser(env) {
|
||||
throw new LessError(parser, e, env);
|
||||
}
|
||||
|
||||
var CleanCSS = environment.getCleanCSS();
|
||||
if (options.cleancss && CleanCSS) {
|
||||
var cleancssOptions = options.cleancssOptions || {};
|
||||
|
||||
if (cleancssOptions.keepSpecialComments === undefined) {
|
||||
cleancssOptions.keepSpecialComments = "*";
|
||||
}
|
||||
cleancssOptions.processImport = false;
|
||||
cleancssOptions.noRebase = true;
|
||||
if (cleancssOptions.noAdvanced === undefined) {
|
||||
cleancssOptions.noAdvanced = true;
|
||||
}
|
||||
|
||||
return new CleanCSS(cleancssOptions).minify(css);
|
||||
} else if (options.compress) {
|
||||
if (options.compress) {
|
||||
return css.replace(/(^(\s)+)|((\s)+$)/g, "");
|
||||
} else {
|
||||
return css;
|
||||
|
||||
Reference in New Issue
Block a user