Skip to content

Commit 7ca278e

Browse files
committed
Update a11y config files for better dependencies, and fix build command to handle exported enums
1 parent e11cc3a commit 7ca278e

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

components/bin/build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const EXPORTPATTERN =
3939
/(^export(?:\s+default)?(?:\s+abstract)?\s+(?:[^ {*}]+\s+(?:enum\s+)?[a-zA-Z0-9_.$]+|\{.* as .*\}))/m;
4040

4141
const EXPORT_IGNORE = ['type', 'interface'];
42-
const EXPORT_PROCESS = ['let', 'const', 'var', 'function', 'class', 'namespace', 'as'];
42+
const EXPORT_PROCESS = ['let', 'const', 'var', 'function', 'class', 'namespace', 'enum', 'as'];
4343

4444
/**
4545
* The module type to use ('cjs' or 'mjs')
@@ -159,7 +159,7 @@ function processParts(parts) {
159159
for (let i = 1; i < parts.length; i += 2) {
160160
const words = parts[i].split(/\s+/);
161161
const n = words.length;
162-
const type = (words[n - 2] === 'enum' ? words[n - 3] : words[n - 2]);
162+
const type = (words[n - 2] === 'enum' && n > 3 ? words[n - 3] : words[n - 2]);
163163
const name = words[n - 1].replace(/\}$/, '');
164164

165165
if (words[1] === 'default' || type === 'default') {

components/mjs/a11y/explorer/config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"webpack": {
77
"name": "a11y/explorer",
88
"libs": [
9-
"components/src/ui/menu/lib",
109
"components/src/a11y/semantic-enrich/lib",
1110
"components/src/a11y/sre/lib",
1211
"components/src/input/mml/lib",

components/mjs/a11y/semantic-enrich/config.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"build": {
33
"component": "a11y/semantic-enrich",
4-
"targets": ["a11y/semantic-enrich.ts"]
4+
"targets": [
5+
"a11y/semantic-enrich.ts",
6+
"a11y/speech/SpeechUtil.ts",
7+
"a11y/speech/GeneratorPool.ts"
8+
]
59
},
610
"webpack": {
711
"name": "a11y/semantic-enrich",

components/mjs/dependencies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
export const dependencies = {
1919
'a11y/semantic-enrich': ['input/mml', 'a11y/sre'],
2020
'a11y/complexity': ['a11y/semantic-enrich'],
21-
'a11y/explorer': ['a11y/semantic-enrich', 'ui/menu'],
21+
'a11y/explorer': ['a11y/semantic-enrich'],
2222
'[mml]/mml3': ['input/mml'],
2323
'[tex]/all-packages': ['input/tex-base'],
2424
'[tex]/action': ['input/tex-base', '[tex]/newcommand'],

components/mjs/ui/menu/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"build": {
33
"component": "ui/menu",
4-
"targets": ["ui/menu"],
4+
"targets": ["ui/menu", "a11y/speech/SpeechMenu.ts"],
55
"excludeSubdirs": true
66
},
77
"webpack": {

0 commit comments

Comments
 (0)