move cleancss into lessc bin only

This commit is contained in:
Luke Page
2014-09-03 18:33:19 +01:00
parent b55b596740
commit e108b50c51
5 changed files with 16 additions and 22 deletions

View File

@@ -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

View File

@@ -44,8 +44,6 @@ return {
alwaysMakePathsAbsolute: function alwaysMakePathsAbsolute() {
return true;
},
getCleanCSS: function () {
},
supportsDataURI: function() {
return false;
},

View File

@@ -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) {

View File

@@ -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;