Skip to content

Commit

Permalink
add platform file schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Metelkin committed Nov 17, 2023
1 parent 9d1d237 commit 569bf9c
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 34 deletions.
3 changes: 0 additions & 3 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# TODO list

- external load for platform.json + DnD
- проверка синтаксиса platform.json
- platform.yml
- not to display output.log
- hot keys for InfoPage
- switch monaco themes
Expand Down
40 changes: 11 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"dependencies": {
"@viz-js/viz": "^3.2.3",
"ajv": "^8.12.0",
"heta-compiler": "^0.7.0",
"heta-compiler": "github:hetalang/heta-compiler",
"jquery": "^3.7.0",
"js-yaml": "^4.1.0",
"jszip": "^3.10.1",
Expand Down
1 change: 1 addition & 0 deletions src/editor-page.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
import './platform-shemas';
import Page from './abstract-page';

export default class EditorPage extends Page {
Expand Down
2 changes: 1 addition & 1 deletion src/heta-templates/platform.json.template.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default `{
"$schema": "https://github.com/hetalang/heta-compiler#",
"$schema": "https://github.com/hetalang/heta-compiler/declaration-schema.json",
"id": "template",
"notes": "platform notes",
"version": "v0.1.0",
Expand Down
13 changes: 13 additions & 0 deletions src/platform-shemas.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
import declarationSchema from 'heta-compiler/src/builder/declaration-schema.json';

monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
validate: true,
schemas: [
{
uri: "https://github.com/hetalang/heta-compiler/declaration-schema.json",
fileMatch: ['*'],
schema: declarationSchema
}
]
});

0 comments on commit 569bf9c

Please sign in to comment.