From b82bc3f651f3d4afe80d2c070a7b966cebef8699 Mon Sep 17 00:00:00 2001 From: Dylan Barrell Date: Mon, 6 Feb 2017 13:43:37 -0400 Subject: [PATCH] chore: add retire.js --- .retireignore.json | 26 +++++++++ Gruntfile.js | 11 +++- package.json | 139 +++++++++++++++++++++++---------------------- 3 files changed, 106 insertions(+), 70 deletions(-) create mode 100644 .retireignore.json diff --git a/.retireignore.json b/.retireignore.json new file mode 100644 index 0000000000..9f1b632d10 --- /dev/null +++ b/.retireignore.json @@ -0,0 +1,26 @@ +[ + { + "path": "node_modules/tough-cookie", + "justification" : "We do not make any HTTP requests" + }, + { + "path": "node_modules/retire", + "justification" : "Used only for testing" + }, + { + "path": "node_modules/grunt-retire", + "justification" : "Used only for testing" + }, + { + "path": "node_modules/grunt-mocha", + "justification" : "Used only for testing" + }, + { + "path": "node_modules/grunt-lib-phantomjs", + "justification" : "Used only for testing" + }, + { + "path": "node_modules/request", + "justification" : "Used only for testing" + } +] \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index 4f94fac21f..6c74a2d26e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -12,6 +12,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-retire'); grunt.loadNpmTasks('grunt-mocha'); grunt.loadTasks('build/tasks'); grunt.loadNpmTasks('grunt-parallel'); @@ -33,6 +34,14 @@ module.exports = function (grunt) { ] } }, + retire: { + options: { + /** list of files to ignore **/ + ignorefile: '.retireignore.json' //or '.retireignore.json' + }, + js: ['lib/*.js'], /** Which js-files to scan. **/ + node: ['./'] /** Which node directories to scan (containing package.json). **/ + }, clean: ['dist', 'tmp'], babel: { options: { @@ -282,7 +291,7 @@ module.exports = function (grunt) { grunt.registerTask('default', ['build']); - grunt.registerTask('build', ['clean', 'jshint', 'validate', 'concat:commons', 'configure', + grunt.registerTask('build', ['clean', 'jshint', 'validate', 'retire', 'concat:commons', 'configure', 'babel', 'concat:engine', 'uglify']); grunt.registerTask('test', ['build', 'testconfig', 'fixture', 'connect', diff --git a/package.json b/package.json index 9dd7c7c323..09e743a2fd 100644 --- a/package.json +++ b/package.json @@ -1,82 +1,83 @@ { - "name": "axe-core", - "description": "Accessibility engine for automated Web UI testing", - "version": "2.1.2", - "license": "MPL-2.0", - "contributors": [ + "name": "axe-core", + "description": "Accessibility engine for automated Web UI testing", + "version": "2.1.2", + "license": "MPL-2.0", + "contributors": [ { - "name": "David Sturley", - "organization": "Deque Systems, Inc.", - "url": "http://deque.com/" + "name": "David Sturley", + "organization": "Deque Systems, Inc.", + "url": "http://deque.com/" }, { - "name": "Dylan Barrell", - "email": "dylan@barrell.com", - "organization": "Deque Systems, Inc.", - "url": "http://deque.com/" + "name": "Dylan Barrell", + "email": "dylan@barrell.com", + "organization": "Deque Systems, Inc.", + "url": "http://deque.com/" }, { - "name": "Wilco Fiers", - "organization": "Deque Systems, Inc.", - "url": "http://deque.com/" + "name": "Wilco Fiers", + "organization": "Deque Systems, Inc.", + "url": "http://deque.com/" }, { - "name": "Dian Fay", - "organization": "Deque Systems, Inc.", - "url": "http://deque.com/" + "name": "Dian Fay", + "organization": "Deque Systems, Inc.", + "url": "http://deque.com/" }, { - "name": "Marcy Sutton", - "organization": "Deque Systems, Inc.", - "url": "http://deque.com/" + "name": "Marcy Sutton", + "organization": "Deque Systems, Inc.", + "url": "http://deque.com/" } ], "repository": { - "type": "git", - "url": "https://github.com/dequelabs/axe-core.git" - }, - "keywords": [ - "Accessibility", - "a11y", - "testing", - "unit", - "tdd", - "bdd", - "aXe" - ], - "main": "axe.js", - "typings": "axe.d.ts", - "scripts": { - "build": "grunt", - "test": "grunt test" - }, - "devDependencies": { - "babel-plugin-transform-object-rest-spread": "^6.6.5", - "babel-polyfill": "^6.7.4", - "babel-preset-es2015": "^6.6.0", - "babelify": "^7.2.0", - "blanket": "~1.2.3", - "chai": "~3.5.0", - "clone": "~1.0.2", - "dot": "~1.0.3", - "grunt": "~0.4.5", - "grunt-babel": "^6.0.0", - "grunt-contrib-clean": "~1.0.0", - "grunt-contrib-concat": "~1.0.0", - "grunt-contrib-connect": "~1.0.1", - "grunt-contrib-copy": "~1.0.0", - "grunt-contrib-jshint": "^1.0.0", - "grunt-contrib-uglify": "~1.0.1", - "grunt-contrib-watch": "~1.0.0", - "grunt-mocha": "~0.4.13", - "grunt-parallel": "^0.4.1", - "html-entities": "^1.2.0", - "jquery": "^3.0.0", - "less": "~2.6.1", - "mocha": "~2.4.5", - "phantomjs-prebuilt": "~2.1.7", - "promise": "~7.1.1", - "revalidator": "~0.3.1", - "selenium-webdriver": "~2.53.1" - } -} \ No newline at end of file + "type": "git", + "url": "https://github.com/dequelabs/axe-core.git" + }, + "keywords": [ + "Accessibility", + "a11y", + "testing", + "unit", + "tdd", + "bdd", + "aXe" + ], + "main": "axe.js", + "typings": "axe.d.ts", + "scripts": { + "build": "grunt", + "test": "grunt test" + }, + "devDependencies": { + "babel-plugin-transform-object-rest-spread": "^6.6.5", + "babel-polyfill": "^6.7.4", + "babel-preset-es2015": "^6.6.0", + "babelify": "^7.2.0", + "blanket": "~1.2.3", + "chai": "~3.5.0", + "clone": "~1.0.2", + "dot": "~1.0.3", + "grunt": "~0.4.5", + "grunt-babel": "^6.0.0", + "grunt-contrib-clean": "~1.0.0", + "grunt-contrib-concat": "~1.0.0", + "grunt-contrib-connect": "~1.0.1", + "grunt-contrib-copy": "~1.0.0", + "grunt-contrib-jshint": "^1.0.0", + "grunt-contrib-uglify": "~1.0.1", + "grunt-contrib-watch": "~1.0.0", + "grunt-mocha": "~0.4.13", + "grunt-parallel": "^0.4.1", + "grunt-retire": "^1.0.7", + "html-entities": "^1.2.0", + "jquery": "^3.0.0", + "less": "~2.6.1", + "mocha": "~2.4.5", + "phantomjs-prebuilt": "~2.1.7", + "promise": "~7.1.1", + "revalidator": "~0.3.1", + "selenium-webdriver": "~2.53.1" + } +}