Skip to content

Commit

Permalink
Upgrade monaco-esm.
Browse files Browse the repository at this point in the history
  • Loading branch information
thesoftwarephilosopher committed Aug 23, 2024
1 parent 72e2df4 commit d85b781
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 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 @@ -7,7 +7,7 @@
"@imlib/core": "^2.5.3"
},
"devDependencies": {
"@imlib/monaco-esm": "^0.0.2",
"@imlib/monaco-esm": "^0.0.3",
"@shikijs/monaco": "^1.14.1",
"@types/babel__standalone": "^7.1.7",
"@types/node": "^22.2.0",
Expand Down
3 changes: 1 addition & 2 deletions site/load-samples.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import monaco from '@imlib/monaco-esm';
import type monacoTypes from 'monaco-editor';
import { jsxlib } from './jsxlib.js';
import { setupTheme } from './theme.js';
import { rules, tokenProvider } from './token-provider.js';
Expand All @@ -13,7 +12,7 @@ monaco.languages.typescript.typescriptDefaults.setCompilerOptions({

setupTheme(rules);

monaco.languages.setMonarchTokensProvider('typescript', tokenProvider as monacoTypes.languages.IMonarchLanguage);
monaco.languages.setMonarchTokensProvider('typescript', tokenProvider as monaco.languages.IMonarchLanguage);

for (const sample of document.querySelectorAll<HTMLElement>('.sample')) {
const code = sample.querySelector('.sample-code>pre')!.textContent!.trim();
Expand Down
3 changes: 1 addition & 2 deletions site/theme.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import monaco from '@imlib/monaco-esm';
import monacoTypes from 'monaco-editor';

export function setupTheme(rules: monacoTypes.editor.ITokenThemeRule[]) {
export function setupTheme(rules: monaco.editor.ITokenThemeRule[]) {
monaco.editor.defineTheme('vsc2', {
base: 'vs-dark',
inherit: true,
Expand Down

0 comments on commit d85b781

Please sign in to comment.