Permalink
Browse files

Adding grunt, automating workflow for minification, etc.

  • Loading branch information...
1 parent b661f23 commit 388e28d9f3c6188c3a104f9681d20bb945caee05 @jefflembeck jefflembeck committed Nov 19, 2013
Showing with 79 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +43 −0 Gruntfile.js
  3. +35 −0 package.json
View
@@ -1,2 +1,3 @@
.DS_Store
.vimdir
+node_modules
View
@@ -0,0 +1,43 @@
+module.exports = function(grunt) {
+ "use strict";
+
+ // Project configuration.
+ grunt.initConfig({
+ uglify: {
+ target: {
+ files: {
@XhmikosR
XhmikosR Nov 20, 2013

You should add the banner to the minified version...

@jefflembeck
jefflembeck Nov 20, 2013 Collaborator

Good call. Done.

@XhmikosR
XhmikosR Nov 20, 2013

I would use the banner option and specify explicitly the banner text in the minifed file, but both work.

You could have a look at this example https://github.com/twbs/bootstrap/blob/master/Gruntfile.js#L13

+ 'respond.min.js': ['respond.src.js']
+ }
+ }
+ },
+ jshint: {
+ options: {
+ curly: true,
+ eqeqeq: true,
+ immed: true,
+ latedef: false,
+ newcap: true,
+ noarg: true,
+ sub: true,
+ undef: true,
+ boss: true,
+ eqnull: true,
+ smarttabs: true,
+ node: true,
+ es5: true,
+ strict: false
+ },
+ globals: {
+ Image: true,
+ window: true
+ }
+ }
+ });
+
+ grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+ grunt.loadNpmTasks( 'grunt-contrib-uglify' );
+
+ // Default task.
+ grunt.registerTask('default', ['jshint', 'uglify:target']);
+
+};
View
@@ -0,0 +1,35 @@
+{
+ "name": "Respond.js",
+ "description": "min/max-width media query polyfill",
+ "version": "1.3.1",
+ "homepage": "https://github.com/scottjehl/Respond",
+ "author": {
+ "name": "Scott Jehl",
+ "email": "scott@filamentgroup.com",
+ "url": "http://filamentgroup.com"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/scottjehl/Respond.git"
+ },
+ "bugs": {
+ "url": "https://github.com/scottjehl/Respond/issues"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT"
+ },
+ {
+ "type": "GPLv2"
+ }
+ ],
+ "devDependencies": {
+ "grunt-cli":"~0.1",
+ "grunt": "~0.4.0",
+ "grunt-contrib-jshint": "~0.2.0",
+ "grunt-contrib-qunit": "~0.3.0",
+ "grunt-contrib-uglify": "0.2.7"
+ }
+
+}

0 comments on commit 388e28d

Please sign in to comment.