Skip to content

Commit

Permalink
Build changes
Browse files Browse the repository at this point in the history
  • Loading branch information
BenOvermyer committed Aug 1, 2023
1 parent 56ff663 commit 452169d
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 51 deletions.
2 changes: 1 addition & 1 deletion dist/elements.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import WordElementSet from "./elementset.js";
export declare function all(): WordElementSet[];
export declare const allElements: WordElementSet[];
88 changes: 43 additions & 45 deletions dist/elements.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,45 @@
"use strict";
import WordElementSet from "./elementset.js";
export function all() {
return [
new WordElementSet("affricates", "a", ["ch", "j"]),
new WordElementSet("voiced dental plosive", "b", ["d", "dh"]),
new WordElementSet("consonants", "c", [
"b",
"c",
"d",
"f",
"g",
"h",
"j",
"k",
"l",
"m",
"n",
"p",
"q",
"r",
"s",
"t",
"v",
"w",
"x",
"y",
"z",
]),
new WordElementSet("dentals", "e", ["d", "n", "t", "l"]),
new WordElementSet("fricatives", "f", ["f", "v"]),
new WordElementSet("voiceless dental plosives", "h", ["t", "th"]),
new WordElementSet("voiceless", "i", ["h", "f"]),
new WordElementSet("velar plosives", "k", ["c", "k"]),
new WordElementSet("liquids", "l", ["l", "r"]),
new WordElementSet("close mid vowels", "m", ["i", "ö", "eu", "oe", "e"]),
new WordElementSet("nasals", "n", ["m", "n", "ng"]),
new WordElementSet("stops", "o", ["t", "d", "p"]),
new WordElementSet("plosives", "p", ["g", "k", "p", "b", "t", "d", "q"]),
new WordElementSet("sibilants", "s", ["s", "sh", "z", "zh"]),
new WordElementSet("stridents", "t", ["f", "v", "s", "sh", "z", "zh"]),
new WordElementSet("vowels", "v", ["a", "e", "i", "o", "u"]),
new WordElementSet("velars", "w", ["w", "wh", "g"]),
new WordElementSet("accented vowels", "x", ["á", "é", "í", "ó", "ú"]),
new WordElementSet("open vowels", "y", ["e", "ee", "i", "oo", "y", "ie"]),
];
}
export const allElements = [
new WordElementSet("affricates", "a", ["ch", "j"]),
new WordElementSet("voiced dental plosive", "b", ["d", "dh"]),
new WordElementSet("consonants", "c", [
"b",
"c",
"d",
"f",
"g",
"h",
"j",
"k",
"l",
"m",
"n",
"p",
"q",
"r",
"s",
"t",
"v",
"w",
"x",
"y",
"z",
]),
new WordElementSet("dentals", "e", ["d", "n", "t", "l"]),
new WordElementSet("fricatives", "f", ["f", "v"]),
new WordElementSet("voiceless dental plosives", "h", ["t", "th"]),
new WordElementSet("voiceless", "i", ["h", "f"]),
new WordElementSet("velar plosives", "k", ["c", "k"]),
new WordElementSet("liquids", "l", ["l", "r"]),
new WordElementSet("close mid vowels", "m", ["i", "ö", "eu", "oe", "e"]),
new WordElementSet("nasals", "n", ["m", "n", "ng"]),
new WordElementSet("stops", "o", ["t", "d", "p"]),
new WordElementSet("plosives", "p", ["g", "k", "p", "b", "t", "d", "q"]),
new WordElementSet("sibilants", "s", ["s", "sh", "z", "zh"]),
new WordElementSet("stridents", "t", ["f", "v", "s", "sh", "z", "zh"]),
new WordElementSet("vowels", "v", ["a", "e", "i", "o", "u"]),
new WordElementSet("velars", "w", ["w", "wh", "g"]),
new WordElementSet("accented vowels", "x", ["á", "é", "í", "ó", "ú"]),
new WordElementSet("open vowels", "y", ["e", "ee", "i", "oo", "y", "ie"]),
];
9 changes: 4 additions & 5 deletions dist/generator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";
import * as RND from "@ironarachne/rng";
import * as Elements from "./elements.js";
import { allElements } from "./elements.js";
export default class WordGenerator {
constructor() {
this.patterns = [];
Expand Down Expand Up @@ -50,10 +50,9 @@ export default class WordGenerator {
}
}
function parsePatternElement(element) {
let elements = Elements.all();
for (let i = 0; i < elements.length; i++) {
if (element === elements[i].symbol) {
return RND.item(elements[i].elements);
for (let i = 0; i < allElements.length; i++) {
if (element === allElements[i].symbol) {
return RND.item(allElements[i].elements);
}
}
return element.toLowerCase();
Expand Down
2 changes: 2 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export { allElements } from "./elements.js";
export { default as WordElementSet } from "./elementset.js";
export { default as WordGenerator } from "./generator.js";
2 changes: 2 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
"use strict";
export { allElements } from "./elements.js";
export { default as WordElementSet } from "./elementset.js";
export { default as WordGenerator } from "./generator.js";

0 comments on commit 452169d

Please sign in to comment.