Browse Source

Add cssmin & uglify grunt tasks.

pull/289/head
Connor Montgomery 11 years ago
parent
commit
cadcd5d3d6
  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', ' */\n',
concat: { concat: {
options: {
banner: '<%= banner %>'
},
ratchet: { ratchet: {
options: {
banner: '<%= banner %>'
},
src: [ src: [
'js/modals.js', 'js/modals.js',
'js/popovers.js', 'js/popovers.js',
@ -55,7 +55,7 @@ module.exports = function(grunt) {
sass: { sass: {
options: { options: {
banner: '<%= banner %>', banner: '<%= banner %>',
style: 'expanded', style: 'expanded'
}, },
dist: { dist: {
files: { files: {
@ -78,6 +78,39 @@ module.exports = function(grunt) {
} }
}, },
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: { watch: {
scripts: { scripts: {
files: [ files: [
@ -91,8 +124,11 @@ module.exports = function(grunt) {
// Load the plugins // Load the plugins
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'}); require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
// Default task(s). // Default task(s).
grunt.registerTask('default', ['sass', 'concat', 'copy']); grunt.registerTask('banner', ['usebanner']);
grunt.registerTask('build', ['sass', 'concat', 'copy']); 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-copy": "~0.5.0",
"grunt-contrib-jshint": "~0.8.0", "grunt-contrib-jshint": "~0.8.0",
"grunt-contrib-nodeunit": "~0.3.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-sass": "~0.7.1",
"grunt-contrib-watch": "~0.5.3", "grunt-contrib-watch": "~0.5.3",
"grunt-jekyll": "~0.4.1", "grunt-jekyll": "~0.4.1",

Loading…
Cancel
Save