Skip to content
Permalink
Browse files

Build: Optimize the grunt file b y using grunt-banner instead of conc…

…at for CSS
  • Loading branch information...
LaurentGoderre committed Jan 10, 2015
1 parent 277856c commit 550331645ad92225005b83f2edee0710f4f27c76
Showing with 8 additions and 14 deletions.
  1. +5 −12 Gruntfile.coffee
  2. +3 −2 package.json
@@ -143,7 +143,7 @@ module.exports = (grunt) ->
"sass:all"
"autoprefixer"
"csslint:unmin"
"concat:css_addBanners"
"usebanner:css"
]
)

@@ -415,20 +415,12 @@ module.exports = (grunt) ->
dest: "dist/unmin/js/i18n"
expand: true

css_addBanners:
usebanner:
css:
options:
banner: "@charset \"utf-8\";\n<%= banner %>"
files:
"dist/unmin/css/polyfills/datalist.css": "dist/unmin/css/polyfills/datalist.css"
"dist/unmin/css/polyfills/datepicker.css": "dist/unmin/css/polyfills/datepicker.css"
"dist/unmin/css/polyfills/details.css": "dist/unmin/css/polyfills/details.css"
"dist/unmin/css/polyfills/meter.css": "dist/unmin/css/polyfills/meter.css"
"dist/unmin/css/polyfills/progress.css": "dist/unmin/css/polyfills/progress.css"
"dist/unmin/css/polyfills/slider.css": "dist/unmin/css/polyfills/slider.css"
"dist/unmin/css/noscript.css": "dist/unmin/css/noscript.css"
"dist/unmin/css/theme.css": "dist/unmin/css/theme.css"
"dist/unmin/css/wet-boew.css": "dist/unmin/css/wet-boew.css"
"dist/unmin/css/ie8-wet-boew.css": "dist/unmin/css/ie8-wet-boew.css"
src: "dist/unmin/css/*.*"

# Builds the demos
assemble:
@@ -1362,6 +1354,7 @@ module.exports = (grunt) ->
# These plugins provide necessary tasks.
@loadNpmTasks "assemble"
@loadNpmTasks "grunt-autoprefixer"
@loadNpmTasks "grunt-banner"
@loadNpmTasks "grunt-bootlint"
@loadNpmTasks "grunt-check-dependencies"
@loadNpmTasks "grunt-contrib-clean"
@@ -35,6 +35,7 @@
"expect.js": "^0.3.1",
"grunt": "~0.4.5",
"grunt-autoprefixer": "^1.0.1",
"grunt-banner": "^0.3.1",
"grunt-bootlint": "^0.2.1",
"grunt-check-dependencies": "~0.6.0",
"grunt-contrib-clean": "~0.6.0",
@@ -57,10 +58,10 @@
"grunt-modernizr": "~0.5.2",
"grunt-sass": "^0.14.1",
"grunt-saucelabs": "^8.2.0",
"grunt-wget": "~0.1.0",
"grunt-wet-boew-postbuild": "wet-boew/grunt-wet-boew-postbuild#v0.1.2",
"grunt-wget": "~0.1.0",
"mocha": "^1.18.2",
"sinon": "^1.9.1",
"time-grunt": "~1.0.0"
}
}
}

0 comments on commit 5503316

Please sign in to comment.
You can’t perform that action at this time.