You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/10/22 17:45:28 UTC

[18/25] js commit: Change Gruntfile to auto-build before running tests (cherry picked from commit 45baa2cce0c9aa682f77f09a35917f6cd7622720)

Change Gruntfile to auto-build before running tests
(cherry picked from commit 45baa2cce0c9aa682f77f09a35917f6cd7622720)


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/df8d3e1b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/df8d3e1b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/df8d3e1b

Branch: refs/heads/2.9.x
Commit: df8d3e1b4fb2dfd41c680eeb12d8cf1be4563fee
Parents: 808d3da
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Jul 29 15:23:50 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Oct 22 11:37:42 2013 -0400

----------------------------------------------------------------------
 Gruntfile.js | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/df8d3e1b/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 81275ad..83f2b7d 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -118,17 +118,17 @@ module.exports = function(grunt) {
         packager.generate(platformName, useWindowsLineEndings, done);
     });
 
-    grunt.registerTask('test', 'Runs test in node', function() {
+    grunt.registerTask('_test', 'Runs test in node', function() {
         var done = this.async();
         require('./test/runner').node(done);
     });
 
-    grunt.registerTask('btest', 'Runs tests in the browser', function() {
+    grunt.registerTask('_btest', 'Runs tests in the browser', function() {
         require('./test/runner').browser();
         this.async(); // never finish.
     });
 
-    grunt.registerTask('complainwhitespace', 'Complain about what fixwhitespace would fix', function() {
+    grunt.registerTask('_complainwhitespace', 'Complain about what fixwhitespace would fix', function() {
         var done = this.async();
         var complainedAboutWhitespace = false;
         processWhiteSpace(function(file, newSource) {
@@ -140,7 +140,7 @@ module.exports = function(grunt) {
         }, done);
     });
 
-    grunt.registerTask('fixwhitespace', 'Converts tabs to four spaces, eliminates trailing white space, converts newlines to proper form - enforcing style guide ftw!', function() {
+    grunt.registerTask('_fixwhitespace', 'Converts tabs to four spaces, eliminates trailing white space, converts newlines to proper form - enforcing style guide ftw!', function() {
         var done = this.async();
         var complainedAboutWhitespace = false;
         processWhiteSpace(function(file, newSource) {
@@ -154,7 +154,7 @@ module.exports = function(grunt) {
     });
 
     // TODO - Delete this task and use Grunt's built-in jshint (CB-3964).
-    grunt.registerTask('hint', 'Runs jshint.', function() {
+    grunt.registerTask('_hint', 'Runs jshint.', function() {
         var done = this.async();
         var knownWarnings = [
             "Redefinition of 'FileReader'",
@@ -182,5 +182,8 @@ module.exports = function(grunt) {
     grunt.loadNpmTasks('grunt-contrib-jshint');
 
     // Default task(s).
-    grunt.registerTask('default', ['cordovajs', 'hint', 'complainwhitespace', 'test']);
+    grunt.registerTask('build', ['cordovajs', '_hint', '_complainwhitespace']);
+    grunt.registerTask('default', ['build', '_test']);
+    grunt.registerTask('test', ['build', '_test']);
+    grunt.registerTask('btest', ['build', '_btest']);
 };