Browse Source

Add cssmin & uglify grunt tasks.

pull/289/head
Connor Montgomery 11 years ago
parent
commit
cadcd5d3d6
  1. 46
      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

46
Gruntfile.js

@ -32,10 +32,10 @@ module.exports = function(grunt) {
' */\n',
concat: {
ratchet: {
options: {
banner: '<%= banner %>'
},
ratchet: {
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: {
@ -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: {
scripts: {
files: [
@ -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