An experimental TypeSpec syntax for Lexicon

meh

+1 -20
+1 -1
DOCS.md
··· 12 12 13 13 ## Playground 14 14 15 - Go to https://playground.typelex.org/ to play with a bunch of lexicons. 15 + **→ [Open Playground](https://playground.typelex.org/)** to play with a bunch of lexicons. 16 16 17 17 If you already know Lexicon, you can learn the syntax by just opening the Lexicons you're familiar with. 18 18
-19
packages/playground/samples/build.js
··· 13 13 // Write each bundled lexicon to disk 14 14 const samplesList = {}; 15 15 16 - // Add the default sample first 17 - const defaultSample = "app.bsky.feed.like"; 18 - if (lexicons.has(defaultSample)) { 19 - const lexicon = lexicons.get(defaultSample); 20 - const bundled = bundleLexicon(defaultSample); 21 - const filename = `${defaultSample}.tsp`; 22 - const filepath = join(outputDir, filename); 23 - 24 - writeFileSync(filepath, bundled); 25 - 26 - samplesList[defaultSample] = { 27 - filename: `samples/dist/${filename}`, 28 - preferredEmitter: "@typelex/emitter", 29 - }; 30 - } 31 - 32 - // Add the rest 33 16 for (const [namespace, lexicon] of lexicons) { 34 - if (namespace === defaultSample) continue; // Already added 35 - 36 17 const bundled = bundleLexicon(namespace); 37 18 const filename = `${namespace}.tsp`; 38 19 const filepath = join(outputDir, filename);