tangled
alpha
login
or
join now
danabra.mov
/
typelex
56
fork
atom
An experimental TypeSpec syntax for Lexicon
56
fork
atom
overview
issues
1
pulls
2
pipelines
fix playground
danabra.mov
5 months ago
fbf297f7
a77ed271
1/1
deploy.yaml
success
53s
+4
-4
2 changed files
expand all
collapse all
unified
split
packages
playground
samples
index.js
vite.config.ts
+3
-3
packages/playground/samples/index.js
···
44
44
const content = readFileSync(fullPath, "utf-8");
45
45
const namespace = file.replace(/\.tsp$/, "").replace(/\//g, ".");
46
46
47
47
-
lexicons.set(namespace, { file, content, suite });
47
47
+
lexicons.set(namespace, { file, content, suite, fullPath });
48
48
}
49
49
}
50
50
51
51
// Build samples list for playground
52
52
const samplesList = {};
53
53
-
for (const [namespace] of lexicons) {
53
53
+
for (const [namespace, lexicon] of lexicons) {
54
54
samplesList[namespace] = {
55
55
-
filename: `samples/${namespace}.tsp`,
55
55
+
filename: relative(join(__dirname, ".."), lexicon.fullPath),
56
56
preferredEmitter: "@typelex/emitter",
57
57
};
58
58
}
+1
-1
packages/playground/vite.config.ts
···
1
1
import { definePlaygroundViteConfig } from "@typespec/playground/vite";
2
2
import { defineConfig } from "vite";
3
3
-
import samples from "./samples/dist/samples.js";
3
3
+
import samples from "./samples/index.js";
4
4
5
5
const playgroundConfig = definePlaygroundViteConfig({
6
6
defaultEmitter: "@typelex/emitter",