-
Notifications
You must be signed in to change notification settings - Fork 789
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3454 from dequelabs/release-4.4.2
chore(release): 4.4.2
- Loading branch information
Showing
44 changed files
with
1,481 additions
and
2,039 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "axe-core", | ||
"version": "4.4.1", | ||
"version": "4.4.2", | ||
"contributors": [ | ||
{ | ||
"name": "David Sturley", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
const path = require('path').posix; | ||
const glob = require('glob'); | ||
const fs = require('fs'); | ||
|
||
function toTitleCase(str) { | ||
return str.replace(/-\w/g, txt => { | ||
return txt.charAt(1).toUpperCase() + txt.substr(2).toLowerCase(); | ||
}); | ||
} | ||
|
||
module.exports = function(grunt) { | ||
grunt.registerMultiTask( | ||
'metadata-function-map', | ||
'Task to generate the metadata-function-map file', | ||
function() { | ||
const files = grunt.task.current.data.files; | ||
|
||
files.forEach(file => { | ||
const src = Array.isArray(file.src) ? file.src : [file.src]; | ||
const map = {}; | ||
let outFile = | ||
'// This file is automatically generated using build/tasks/metadata-function-map.js\n'; | ||
|
||
src.forEach(globPath => { | ||
glob.sync(globPath).forEach(filePath => { | ||
const relativePath = path.relative( | ||
path.dirname(file.dest), | ||
filePath | ||
); | ||
const filename = path.basename(filePath, '.js'); | ||
const functionName = toTitleCase(filename); | ||
|
||
outFile += `import ${functionName} from '${relativePath}';\n`; | ||
map[filename] = functionName; | ||
}); | ||
}); | ||
|
||
outFile += `\nconst metadataFunctionMap = {\n`; | ||
outFile += Object.keys(map) | ||
.sort() | ||
.map(key => ` '${key}': ${map[key]}`) | ||
.join(',\n'); | ||
outFile += `\n};\n\nexport default metadataFunctionMap;`; | ||
|
||
fs.writeFileSync(file.dest, outFile, 'utf-8'); | ||
}); | ||
} | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.