Browse Source

Merge pull request #289 from connor/grunt_min_cssmin

Add cssmin & uglify grunt tasks.
pull/296/head
Connor Montgomery 11 years ago
parent
commit
c4ebcfc4b8
  1. 50
      Gruntfile.js
  2. 11
      dist/ratchet.min.css
  3. 11
      dist/ratchet.min.js
  4. 11
      docs/dist/ratchet.min.css
  5. 11
      docs/dist/ratchet.min.js
  6. 3
      package.json

50
Gruntfile.js

@ -32,10 +32,10 @@ module.exports = function(grunt) {
' */\n',
concat: {
options: {
banner: '<%= banner %>'
},
ratchet: {
options: {
banner: '<%= banner %>'
},
src: [
'js/modals.js',
'js/popovers.js',
@ -55,7 +55,7 @@ module.exports = function(grunt) {
sass: {
options: {
banner: '<%= banner %>',
style: 'expanded',
style: 'expanded'
},
dist: {
files: {
@ -77,6 +77,39 @@ module.exports = function(grunt) {
dest: 'docs/dist'
}
},
cssmin: {
combine: {
files: {
'dist/<%= pkg.name %>.min.css': ['dist/<%= pkg.name %>.css']
}
}
},
uglify: {
options: {
report: 'min'
},
ratchet: {
src: 'dist/<%= pkg.name %>.js',
dest: 'dist/<%= pkg.name %>.min.js'
}
},
usebanner: {
dist: {
options: {
position: 'top',
banner: '<%= banner %>'
},
files: {
src: [
'dist/<%= pkg.name %>.min.js',
'dist/<%= pkg.name %>.min.css'
]
}
}
},
watch: {
scripts: {
@ -91,8 +124,11 @@ module.exports = function(grunt) {
// Load the plugins
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
// Default task(s).
grunt.registerTask('default', ['sass', 'concat', 'copy']);
grunt.registerTask('build', ['sass', 'concat', 'copy']);
grunt.registerTask('banner', ['usebanner']);
grunt.registerTask('dist-css', ['sass', 'cssmin']);
grunt.registerTask('dist-js', ['concat', 'uglify']);
grunt.registerTask('dist', ['dist-css', 'dist-js', 'banner', 'copy']);
grunt.registerTask('default', ['dist']);
grunt.registerTask('build', ['dist']);
};

11
dist/ratchet.min.css vendored

File diff suppressed because one or more lines are too long

11
dist/ratchet.min.js vendored

File diff suppressed because one or more lines are too long

11
docs/dist/ratchet.min.css vendored

File diff suppressed because one or more lines are too long

11
docs/dist/ratchet.min.js vendored

File diff suppressed because one or more lines are too long

3
package.json

@ -32,6 +32,9 @@
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-jshint": "~0.8.0",
"grunt-contrib-nodeunit": "~0.3.0",
"grunt-contrib-uglify": "~0.3.0",
"grunt-contrib-cssmin": "~0.8.0",
"grunt-banner": "~0.2.0",
"grunt-contrib-sass": "~0.7.1",
"grunt-contrib-watch": "~0.5.3",
"grunt-jekyll": "~0.4.1",

Loading…
Cancel
Save