Skip to content

Commit

Permalink
Merge pull request #64 from maheshsenni/grunt-jquery-build
Browse files Browse the repository at this point in the history
Build jQuery version using Grunt #46
  • Loading branch information
mroderick committed Aug 9, 2014
2 parents d647f47 + 1f69d9b commit 334ced1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
15 changes: 15 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,32 @@ module.exports = function(grunt) {
server: {
port: 1111
}
},

concat: {
options: {
// overrides the default linefeed separator
separator: ''
},
jquery: {
src: ['wrappers/jquery/pubsub.js.pre.txt', 'src/pubsub.js', 'wrappers/jquery/pubsub.js.post.txt'],
dest: 'jquery.pubsub.js'
}
}
});

grunt.loadNpmTasks('grunt-buster');
grunt.loadNpmTasks('grunt-jslint');
grunt.loadNpmTasks('grunt-contrib-concat');

// override the built-in lint task with jslint
grunt.registerTask('lint', 'jslint');

grunt.registerTask('test', ['lint', 'buster']);

// build jQuery version
grunt.registerTask('jquery', 'concat:jquery');

// Default task.
grunt.registerTask('default', 'test');
};
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,14 @@ PubSub.immediateExceptions = true;

## Plugin for jQuery

By default PubSubJS can be used in any browser or CommonJS environment, including [node](http://nodejs.org). Additionally, PubSubJS can be built specifically for jQuery.
By default PubSubJS can be used in any browser or CommonJS environment, including [node](http://nodejs.org). Additionally, PubSubJS can be built specifically for jQuery using Rake.

$ rake jquery

or using Grunt

$ grunt jquery

Produces jquery.pubsub.js

### Use with jQuery
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"devDependencies": {
"grunt-jslint": "0.2.5",
"grunt-buster": "0.1.2",
"grunt-contrib-concat": "0.5.0",
"buster": "0.7.13",
"grunt": "~0.4.4",
"grunt-cli": "~0.1.13"
Expand Down

0 comments on commit 334ced1

Please sign in to comment.