-
Notifications
You must be signed in to change notification settings - Fork 83
Added the glossary page #2395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Added the glossary page #2395
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/usr/bin/env zx | ||
| import 'zx/globals' | ||
| import { config, commitAndPush } from './commons.mjs' | ||
|
|
||
| const commitMessage = (await $`git log -1 --pretty=%B`).stdout | ||
| await commitAndPush(config, commitMessage) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,35 @@ | ||
| #!/usr/bin/env zx | ||
| import 'zx/globals'; | ||
| import { config, cloneWcagActRules, commitAndPush } from './commons.mjs' | ||
| import { config, cloneWcagActRules } from './commons.mjs' | ||
|
|
||
| const ACT_TOOLS_PATH = process.env.ACT_TOOLS_PATH || './node_modules/act-tools'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: If The |
||
|
|
||
| await cloneWcagActRules(config); | ||
| await generateProposedRulePages(config); | ||
| await generateexamples(config); | ||
| const commitMessage = (await $`git log -1 --pretty=%B`).stdout; | ||
| await commitAndPush(config, commitMessage); | ||
| await generateGlossaryPage(config); | ||
|
|
||
| async function generateGlossaryPage({ tmpDir, rulesDir, glossaryDir, testAssetsDir }) { | ||
| await $`node ${ACT_TOOLS_PATH}/dist/cli/generate-glossary.js \ | ||
| --rulesDir "${rulesDir}" \ | ||
| --glossaryDir "${glossaryDir}" \ | ||
| --testAssetsDir "${testAssetsDir}" \ | ||
| --outDir "${tmpDir}" | ||
| `; | ||
| } | ||
|
|
||
| async function generateProposedRulePages({ tmpDir, rulesDir, glossaryDir, testAssetsDir }) { | ||
| await $`node ./node_modules/act-tools/dist/cli/rule-transform.js \ | ||
| --rulesDir "${rulesDir}" \ | ||
| --glossaryDir "${glossaryDir}" \ | ||
| --testAssetsDir "${testAssetsDir}" \ | ||
| --outDir "${tmpDir}" \ | ||
| --proposed | ||
| await $`node ${ACT_TOOLS_PATH}/dist/cli/rule-transform.js \ | ||
| --rulesDir "${rulesDir}" \ | ||
| --glossaryDir "${glossaryDir}" \ | ||
| --testAssetsDir "${testAssetsDir}" \ | ||
| --outDir "${tmpDir}" \ | ||
| --proposed | ||
| `; | ||
| } | ||
|
|
||
| async function generateexamples({ tmpDir, rulesDir, testAssetsDir }) { | ||
| await $`node ./node_modules/act-tools/dist/cli/build-examples.js \ | ||
| await $`node ${ACT_TOOLS_PATH}/dist/cli/build-examples.js \ | ||
| --rulesDir "${rulesDir}" \ | ||
| --testAssetsDir "${testAssetsDir}" \ | ||
| --outDir "${tmpDir}" \ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note (non-blocking): I usually prefer nullish coalescence (
??) in order to avoid the occasional blow-up with falsy-but-actually-correct values.