Skip to content

Commit

Permalink
Don't stringify the JSON data
Browse files Browse the repository at this point in the history
  • Loading branch information
TungstnBallon committed Oct 4, 2024
1 parent 8e37c12 commit ca88146
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions libs/language-server/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
],
"outputs": [
"{workspaceRoot}/apps/vs-code-extension/assets/jayvee.tmLanguage.json",
"{workspaceRoot}/libs/monaco-editor/src/lib/generated/jayvee.tmLanguage.json",
"{workspaceRoot}/libs/monaco-editor/src/lib/generated/language-configuration.json",
"{workspaceRoot}/libs/monaco-editor/src/lib/jayvee.tmLanguage.json",
"{workspaceRoot}/libs/monaco-editor/src/lib/language-configuration.json",
"{workspaceRoot}/apps/docs/src/theme/prism-jayvee.js",
"{projectRoot}/src/lib/ast/generated"
],
Expand Down
4 changes: 2 additions & 2 deletions libs/monaco-editor/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# SPDX-License-Identifier: AGPL-3.0-only

# file generated by Langium
src/lib/generated/jayvee.tmLanguage.json
src/lib/jayvee.tmLanguage.json
# file copied from vs-code-extension
src/lib/generated/language-configuration.json
src/lib/language-configuration.json
12 changes: 6 additions & 6 deletions libs/monaco-editor/src/lib/monaco-editor.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import tmGrammar from './generated/jayvee.tmLanguage.json';
import config from './generated/language-configuration.json';
import tmGrammar from './jayvee.tmLanguage.json';
import config from './language-configuration.json';

export function getTextMateGrammar(): string {
return JSON.stringify(tmGrammar);
export function getTextMateGrammar(): unknown {
return tmGrammar;
}

export function getLanguageConfiguration(): string {
return JSON.stringify(config);
export function getLanguageConfiguration(): unknown {
return config;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const confVscode = join(
const confMonaco = join(
getSourcePath('monaco-editor'),
'lib',
'generated',
'language-configuration.json',
);

Expand Down
1 change: 0 additions & 1 deletion tools/scripts/monaco-editor/copy-textmate-grammar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const tmVscode = join(
const tmMonaco = join(
getSourcePath('monaco-editor'),
'lib',
'generated',
'jayvee.tmLanguage.json',
);

Expand Down

0 comments on commit ca88146

Please sign in to comment.