diff --git a/.jscs.json b/.jscs.json index ad1ad0b..cf7fe3b 100644 --- a/.jscs.json +++ b/.jscs.json @@ -38,10 +38,5 @@ "requireSpacesInsideArrayBrackets": "all", "requireSpacesInsideObjectBrackets" : "all", - "validateJSDoc": { - "checkParamNames": true, - "checkRedundantParams": true, - "requireParamTypes": true - }, "validateQuoteMarks": "'" } diff --git a/.jshintrc b/.jshintrc index f21cd8e..9a03396 100644 --- a/.jshintrc +++ b/.jshintrc @@ -2,7 +2,7 @@ "curly": true, "eqeqeq": true, "immed": true, - "latedef": true, + "latedef": false, "newcap": true, "noarg": true, "sub": true, diff --git a/.travis.yml b/.travis.yml index b1e5638..8964e8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: node_js node_js: - - "0.10" + - "4" + - "6" + - "7" branches: only: diff --git a/package.json b/package.json index b23b657..5429905 100644 --- a/package.json +++ b/package.json @@ -23,25 +23,27 @@ ], "main": "Gruntfile.js", "engines": { - "node": ">= 0.8.0" + "node": ">= 4.0.0" }, "scripts": { + "grunt": "grunt", "test": "grunt test", "coveralls": "jscoverage tasks/lib/phantomas.js && PHANTOMAS_COV=1 nodeunit --reporter=lcov test/lib/phantomasTest.js | coveralls" }, "devDependencies": { "coveralls": "~2.11.0", - "grunt": "^0.4.5", - "grunt-contrib-clean": "~0.6.0", - "grunt-contrib-compass": "~0.9.0", - "grunt-contrib-copy": "~0.5.0", - "grunt-contrib-jshint": "~0.10.0", - "grunt-contrib-nodeunit": "~0.4.0", - "grunt-contrib-uglify": "~0.5.0", - "grunt-contrib-watch": "~0.6.0", - "grunt-jscs": "^0.7.1", - "jscoverage": "~0.5.0-rc1", - "nodeunit": "~0.9.0" + "grunt": "^1.0.1", + "grunt-cli": "^1.2.0", + "grunt-contrib-clean": "~1.0.0", + "grunt-contrib-compass": "~1.1.1", + "grunt-contrib-copy": "~1.0.0", + "grunt-contrib-jshint": "~1.1.0", + "grunt-contrib-nodeunit": "~1.0.0", + "grunt-contrib-uglify": "~2.0.0", + "grunt-contrib-watch": "~1.0.0", + "grunt-jscs": "^3.0.1", + "jscoverage": "~0.6.0", + "nodeunit": "~0.10.2" }, "peerDependencies": { "grunt": ">=0.4.0" @@ -54,11 +56,11 @@ "phantomjs" ], "dependencies": { - "bluebird": "~2.3.0", - "phantomas": "~1.14.0", + "bluebird": "~3.4.7", + "phantomas": "~1.18.0", "node-fs": "~0.1.7", - "lodash": "~2.4.1", - "html-minifier": "~0.6.0", - "json2csv": "~2.2.1" + "lodash": "~4.17.4", + "html-minifier": "~3.2.3", + "json2csv": "~3.7.3" } } diff --git a/tasks/lib/phantomas.js b/tasks/lib/phantomas.js index 722b69d..136e584 100644 --- a/tasks/lib/phantomas.js +++ b/tasks/lib/phantomas.js @@ -381,7 +381,7 @@ Phantomas.prototype.formResult = function( results ) { } ); // process all runs - _.each( results, function( promise ) { + results.forEach( function( promise ) { if ( promise.isFulfilled() ) { this.grunt.log.ok( 'Phantomas execution successful.' ); @@ -805,7 +805,7 @@ Phantomas.prototype.writeData = function( result ) { // iterate of output formats // and write data - _.each( this.options.output, function( format ) { + this.options.output.forEach( function( format ) { if ( this._writeData[ format ] !== undefined ) { runs.push( this._writeData[ format ].bind( this )( result ) diff --git a/test/lib/phantomasTest.js b/test/lib/phantomasTest.js index 221d582..97ec5c0 100644 --- a/test/lib/phantomasTest.js +++ b/test/lib/phantomasTest.js @@ -562,7 +562,7 @@ exports.phantomas = { executePhantomas : function( test ) { var options = { - url : 'http://whatever.com', + url : 'http://example.com/', numberOfRuns : 5, options : {}, indexPath : './tmp/', @@ -879,10 +879,6 @@ exports.phantomas = { phantomas.readMetricsFile( '123456.json' ) .catch( Error, function( error ) { test.strictEqual( typeof error, 'object' ); - test.strictEqual( - error.toString(), - 'SyntaxError: Unexpected token e' - ); test.done(); } );