Skip to content

Commit

Permalink
Build: Optimize the grunt file b y using grunt-banner instead of conc…
Browse files Browse the repository at this point in the history
…at for CSS
  • Loading branch information
LaurentGoderre committed Jan 10, 2015
1 parent 277856c commit 5503316
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
17 changes: 5 additions & 12 deletions Gruntfile.coffee
Expand Up @@ -143,7 +143,7 @@ module.exports = (grunt) ->
"sass:all"
"autoprefixer"
"csslint:unmin"
"concat:css_addBanners"
"usebanner:css"
]
)

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -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",
Expand All @@ -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.