Merge pull request #2346 from tschaub/clean-css

Minify CSS.
This commit is contained in:
Tim Schaub
2014-07-12 11:48:12 -06:00
2 changed files with 8 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ from pake import ifind, main, output, rule, target, variables, virtual, which
if sys.platform == 'win32':
win = {
'CLEANCSS': './node_modules/.bin/cleancss',
'GIT': 'git.exe',
'GJSLINT': 'gjslint.exe',
'JAVA': 'java.exe',
@@ -70,6 +71,7 @@ if sys.platform == 'win32':
setattr(variables, program, path)
else:
variables.CLEANCSS = './node_modules/.bin/cleancss'
variables.GIT = 'git'
variables.GJSLINT = 'gjslint'
variables.JSHINT = './node_modules/.bin/jshint'
@@ -82,9 +84,9 @@ else:
variables.BRANCH = output(
'%(GIT)s', 'rev-parse', '--abbrev-ref', 'HEAD').strip()
EXECUTABLES = [variables.GIT, variables.GJSLINT, variables.JAVA, variables.JAR,
variables.JSDOC, variables.JSHINT, variables.PYTHON,
variables.PHANTOMJS]
EXECUTABLES = [variables.CLEANCSS, variables.GIT, variables.GJSLINT,
variables.JAVA, variables.JAR, variables.JSDOC,
variables.JSHINT, variables.PYTHON, variables.PHANTOMJS]
EXPORTS = 'build/exports.js'
@@ -159,9 +161,9 @@ virtual('check', 'lint', 'jshint', 'build/ol-all.js', 'test')
virtual('todo', 'fixme')
@target('build/ol.css', 'build/ol.js')
@target('build/ol.css')
def build_ol_css(t):
t.touch()
t.output('%(CLEANCSS)s', 'css/ol.css')
@target('build/ol.js', SRC, SHADER_SRC, 'buildcfg/ol.json')

View File

@@ -20,6 +20,7 @@
"htmlparser2": "~3.7.1"
},
"devDependencies": {
"clean-css": "^2.2.7",
"closure-util": "0.19.0",
"expect.js": "~0.3.1",
"fs-extra": "~0.8.1",