forked from DISIC/Ara
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80a9f40
commit 1772a5b
Showing
8 changed files
with
5,664 additions
and
5 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/** | ||
* This scripts generates a file containing every RGAA tests methodology based | ||
* on the https://github.com/DISIC/accessibilite.numerique.gouv.fr repository. | ||
* | ||
* The result file uses the JSON format and contains a mapping of test ids | ||
* (ex: "1.2.3") with the associated methodology in Markdown. | ||
*/ | ||
|
||
/* eslint-disable */ | ||
const child_process = require("node:child_process"); | ||
const util = require("node:util"); | ||
const path = require("path"); | ||
const fs = require("fs").promises; | ||
const repositoryName = "ReferentielAccessibiliteWeb"; | ||
const jsonDirectoryName = "json"; | ||
|
||
const exec = util.promisify(child_process.exec); | ||
|
||
async function cloneRgaaRepository() { | ||
await exec("rm -rf " + repositoryName); | ||
await exec( | ||
"git clone https://github.com/accessibility-luxembourg/ReferentielAccessibiliteWeb" | ||
); | ||
} | ||
|
||
async function generateMethodologies() { | ||
const METHODOLOGIES_SOURCE = path.join( | ||
__dirname, | ||
"..", | ||
"./" + repositoryName + "/" + jsonDirectoryName + "/methodologies.json" | ||
); | ||
|
||
const METHODOLOGIES_DESTINATION = path.join( | ||
__dirname, | ||
"..", | ||
"./src/methodologies.json" | ||
); | ||
|
||
await fs.copyFile(METHODOLOGIES_SOURCE, METHODOLOGIES_DESTINATION); | ||
} | ||
|
||
async function generateCriteria() { | ||
const CRITERIA_SOURCE = path.join( | ||
__dirname, | ||
"..", | ||
"./" + repositoryName + "/" + jsonDirectoryName + "/criteres.json" | ||
); | ||
|
||
const CRITERIA_DESTINATION = path.join( | ||
__dirname, | ||
"..", | ||
"./src/criteres.json" | ||
); | ||
|
||
await fs.copyFile(CRITERIA_SOURCE, CRITERIA_DESTINATION); | ||
} | ||
|
||
(async function main() { | ||
await cloneRgaaRepository(); | ||
await generateMethodologies(); | ||
await generateCriteria(); | ||
})(); |
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