From: Nick Downing Date: Sun, 15 Mar 2020 01:31:43 +0000 (-0400) Subject: Get rid of phantomjs-prebuilt dependency (needed for tests, don't want tests) X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=8c49e75597fb7738f616dca66742ab109385a9ce;p=html-minifier.git Get rid of phantomjs-prebuilt dependency (needed for tests, don't want tests) --- diff --git a/Gruntfile.js b/Gruntfile.js index 22a426b..944b996 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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'); }; diff --git a/package.json b/package.json index f2ac174..7a12289 100644 --- a/package.json +++ b/package.json @@ -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": {