Skip to content

Commit

Permalink
Set up to build on grunt 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
carhartl committed Feb 25, 2013
1 parent bd3c971 commit a09ee1c
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 52 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.min.js
node_modules
build
16 changes: 16 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"boss": true,
"browser": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"expr": true,
"evil": true,
"newcap": true,
"noarg": true,
"undef": true,
"globals": {
"define": true,
"jQuery": true
}
}
38 changes: 38 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*jshint node: true */

'use strict';

module.exports = function (grunt) {

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
qunit: {
all: ['test/index.html']
},
jshint: {
files: [
'Gruntfile.js',
'jquery.cookie.js'
],
options: {
jshintrc: '.jshintrc'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> v<%= pkg.version %> | <%= pkg.license %> */\n'
},
build: {
src: 'jquery.cookie.js',
dest: 'build/jquery.cookie-<%= pkg.version %>.min.js'
}
}
});

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-qunit');

grunt.registerTask('default', ['jshint', 'qunit']);
grunt.registerTask('ci', ['default']);
};
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ Open in browser:

$ open http://0.0.0.0:8124/test/index.html

For quick *non cross-browser* testing use grunt:

For quick *non cross-browser* testing use grunt, install grunt CLI and project dependencies as outlined in this guide: <http://gruntjs.com/getting-started>, then run:
$ grunt

## Development
Expand Down
49 changes: 0 additions & 49 deletions grunt.js

This file was deleted.

26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "jquery.cookie",
"version": "1.3.1",
"description": "A simple, lightweight jQuery plugin for reading, writing and deleting cookies.",
"main": "Gruntfile.js",
"directories": {
"test": "test"
},
"scripts": {
"test": "grunt"
},
"repository": {
"type": "git",
"url": "git://github.com/carhartl/jquery-cookie.git"
},
"author": "Klaus Hartl",
"license": "MIT",
"gitHead": "bd3c9713222bace68d25fe2128c0f8633cad1269",
"readmeFilename": "README.md",
"devDependencies": {
"grunt": "~0.4.0",
"grunt-contrib-jshint": "~0.1.0",
"grunt-contrib-uglify": "~0.1.0",
"grunt-contrib-qunit": "~0.1.0"
}
}

0 comments on commit a09ee1c

Please sign in to comment.