Skip to content

Commit

Permalink
automatically generate the schema
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnuttandrew committed Feb 19, 2024
1 parent d5055d8 commit f34f769
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 540 deletions.
15 changes: 0 additions & 15 deletions LintLanguageDocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,3 @@ Maps:
{filter: Variable | Value[], func: EXPR, varb: Variable}
{reverse: Variable | Value[]}
{speed: Variable | Value[]}

```yaml
---
all:
varbs: [a, b]
in: colors
where:
"!=": {left: index(a) right: index(b)}
predicate:
not:
similar:
left: {cvdSim: a, type: deuteranopia}
right: {cvdSim: b, type: deuteranopia}
threshold: 9
```
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"build-data": "mkdir data && cp node_modules/vega-datasets/data/* ./data/",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage"
"test:coverage": "vitest run --coverage",
"gen-schema": "npx ts-json-schema-generator --path src/lib/lint-language/lint-type.ts --type LintProgram > public/lint-schema.json --minify"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.0.0",
Expand All @@ -29,6 +30,7 @@
"postcss": "^8.4.32",
"svelte": "^4.2.3",
"svelte-check": "^3.6.0",
"ts-json-schema-generator": "^1.5.0",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vega-typings": "^1.0.1",
Expand Down
Loading

0 comments on commit f34f769

Please sign in to comment.