Get rid of phantomjs-prebuilt dependency (needed for tests, don't want tests)
authorNick Downing <nick@ndcode.org>
Sun, 15 Mar 2020 01:31:43 +0000 (21:31 -0400)
committerNick Downing <nick@ndcode.org>
Sun, 15 Mar 2020 01:31:43 +0000 (21:31 -0400)
Gruntfile.js
package.json

index 22a426b..944b996 100644 (file)
@@ -125,41 +125,41 @@ module.exports = function(grunt) {
     return details.failed;
   }
 
-  var phantomjs = require('phantomjs-prebuilt').path;
-  grunt.registerMultiTask('qunit', function() {
-    var done = this.async();
-    var errors = [];
-
-    function run(testType, binPath, testPath) {
-      grunt.util.spawn({
-        cmd: binPath,
-        args: ['test.js', testPath]
-      }, function(error, result) {
-        if (error) {
-          grunt.log.error(result.stderr);
-          grunt.log.error(testType + ' test failed to load');
-          errors.push(-1);
-        }
-        else {
-          var output = result.stdout;
-          var index = output.lastIndexOf('\n');
-          if (index !== -1) {
-            // There's something before the report JSON
-            // Log it to the console -- it's probably some debug output:
-            console.log(output.slice(0, index));
-            output = output.slice(index);
-          }
-          errors.push(report(testType, JSON.parse(output)));
-        }
-        if (errors.length === 2) {
-          done(!errors[0] && !errors[1]);
-        }
-      });
-    }
-
-    run('node', process.argv[0], this.data[0]);
-    run('web', phantomjs, this.data[1]);
-  });
+  //var phantomjs = require('phantomjs-prebuilt').path;
+  //grunt.registerMultiTask('qunit', function() {
+  //  var done = this.async();
+  //  var errors = [];
+  //
+  //  function run(testType, binPath, testPath) {
+  //    grunt.util.spawn({
+  //      cmd: binPath,
+  //      args: ['test.js', testPath]
+  //    }, function(error, result) {
+  //      if (error) {
+  //        grunt.log.error(result.stderr);
+  //        grunt.log.error(testType + ' test failed to load');
+  //        errors.push(-1);
+  //      }
+  //      else {
+  //        var output = result.stdout;
+  //        var index = output.lastIndexOf('\n');
+  //        if (index !== -1) {
+  //          // There's something before the report JSON
+  //          // Log it to the console -- it's probably some debug output:
+  //          console.log(output.slice(0, index));
+  //          output = output.slice(index);
+  //        }
+  //        errors.push(report(testType, JSON.parse(output)));
+  //      }
+  //      if (errors.length === 2) {
+  //        done(!errors[0] && !errors[1]);
+  //      }
+  //    });
+  //  }
+  //
+  //  run('node', process.argv[0], this.data[0]);
+  //  run('web', phantomjs, this.data[1]);
+  //});
 
   grunt.registerMultiTask('replace', function() {
     var pattern = this.data[0];
@@ -175,11 +175,11 @@ module.exports = function(grunt) {
     'uglify'
   ]);
 
-  grunt.registerTask('test', [
-    'eslint',
-    'dist',
-    'qunit'
-  ]);
-
-  grunt.registerTask('default', 'test');
+  //grunt.registerTask('test', [
+  //  'eslint',
+  //  'dist',
+  //  'qunit'
+  //]);
+  //
+  //grunt.registerTask('default', 'test');
 };
index f2ac174..7a12289 100644 (file)
@@ -67,7 +67,6 @@
     "grunt-browserify": "5.3.x",
     "grunt-contrib-uglify": "3.4.x",
     "gruntify-eslint": "4.0.x",
-    "phantomjs-prebuilt": "2.1.x",
     "qunit": "2.x"
   },
   "benchmarkDependencies": {