Skip to content

Commit

Permalink
grunt.js refactorized. New 'grunt devel' for faster building (no mini…
Browse files Browse the repository at this point in the history
…fied flavor).
  • Loading branch information
ibc committed Feb 23, 2013
1 parent 295f9d1 commit 579027c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Doc: http://manuel.manuelles.nl/blog/2012/06/22/integrate-travis-ci-into-grunt/

language: node_js

node_js:
Expand Down
23 changes: 15 additions & 8 deletions grunt.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,8 @@ module.exports = function(grunt) {
uglify: {}
});

// Default task.
grunt.registerTask('default', ['concat:dist', 'lint', 'min', 'concat:post', 'concat:post_min']);

// Test tasks.
grunt.registerTask('testNoWebRTC', ['qunit:noWebRTC']);
grunt.registerTask('test', ['testNoWebRTC']);

// Task for building JsSIP grammar.
// Task for building JsSIP Grammar.js and Grammar.min.js files.
grunt.registerTask('grammar', function(){
var done = this.async(); // This is an async task.
var sys = require('sys');
Expand Down Expand Up @@ -135,11 +129,24 @@ module.exports = function(grunt) {
});
});

// Task for building JsSIP in both uncompressed and minified flavors.
grunt.registerTask('build', ['concat:dist', 'lint', 'min', 'concat:post', 'concat:post_min']);

// Task for building just JsSIP uncompressed (faster during development).
grunt.registerTask('devel', ['concat:dist', 'lint', 'concat:post']);

// Test tasks.
grunt.registerTask('testNoWebRTC', ['qunit:noWebRTC']);
grunt.registerTask('test', ['testNoWebRTC']);

// A task for doing everything.
grunt.registerTask('all', ['grammar', 'default', 'test']);
grunt.registerTask('all', ['grammar', 'build', 'test']);

// Travis CI task (it does everything).
// Doc: http://manuel.manuelles.nl/blog/2012/06/22/integrate-travis-ci-into-grunt/
grunt.registerTask('travis', ['all']);

// Default task is an alias for 'build'.
grunt.registerTask('default', ['build']);

};

0 comments on commit 579027c

Please sign in to comment.