Skip to content

Commit

Permalink
Babelify Axe
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebeach committed Mar 26, 2016
1 parent 192601b commit bcf283d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"presets": [
"es2015"
],
"plugins": [
"transform-object-rest-spread"
]
}
19 changes: 17 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = function (grunt) {
});
}

grunt.loadNpmTasks("grunt-browserify");
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
Expand All @@ -25,6 +26,20 @@ module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: ['dist', 'tmp'],
babelify: {
dist: {
options: {
transform: [
["babelify"]
]
},
files: {
"./dist/axe.js": [
"./dist/axe.js"
]
}
}
},
concat: {
engine: {
src: [
Expand Down Expand Up @@ -265,9 +280,9 @@ module.exports = function (grunt) {
grunt.registerTask('default', ['build']);

grunt.registerTask('build', ['clean', 'validate', 'concat:commons', 'configure',
'concat:engine', 'copy', 'uglify']);
'concat:engine', 'copy', 'browserify', 'uglify']);

grunt.registerTask('test', ['build', 'testconfig', 'fixture', 'connect',
grunt.registerTask('test', ['build', 'testconfig', 'fixture', 'connect',
'mocha', 'jshint']);

grunt.registerTask('test-ci', ['build', 'fixture', 'connect', 'continue:on', 'saucelabs-mocha',
Expand Down
4 changes: 3 additions & 1 deletion lib/intro.stub
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@
* distribute or in any file that contains substantial portions of this source
* code.
*/
(function (global) {
(function () {
// A window reference is required to access the axe object in a "global".
var global = window;
2 changes: 1 addition & 1 deletion lib/outro.stub
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

axe.version = '<%= pkg.version %>';
}(this));
}());
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@
"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.1.7",
"chai": "~3.0.0",
"clone": "~1.0.2",
"dot": "~1.0.3",
"grunt": "~0.4.5",
"grunt-blanket-mocha": "~0.5.0",
"grunt-browserify": "^5.0.0",
"grunt-continue": "^0.1.0",
"grunt-contrib-clean": "~0.6.0",
"grunt-contrib-concat": "~0.5.1",
Expand Down

0 comments on commit bcf283d

Please sign in to comment.