Skip to content

Commit

Permalink
fix: web languageId and fileExt replacement / configuration, remove n…
Browse files Browse the repository at this point in the history
…eed for http-server
  • Loading branch information
kaisalmen committed Jun 14, 2024
1 parent 0cb80a2 commit 8931941
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
],
"scripts": {
"build": "vite build",
"bundle:serve": "http-server ./dist --port 5175",
"dev": "vite",
"dev:debug": "vite --debug --force",
"serve": "npm run dev"
"serve": "vite preview"
},
"dependencies": {
"@codingame/monaco-vscode-editor-service-override": "~5.2.0",
Expand All @@ -27,8 +26,7 @@
},
"devDependencies": {
"@codingame/esbuild-import-meta-url-plugin": "~1.0.2",
"vite": "~5.2.13",
"http-server": "~14.1.1"
"vite": "~5.2.13"
},
"volta": {
"node": "18.20.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export const setupConfigClassic = (): UserConfig => {
codeResources: {
main: {
text: '// <%= RawLanguageName %> is running in the web!',
uri: '/workspace/hello-world.<%= file-extension %>',
fileExt: '<%= file-glob-extension %>',
enforceLanguageId: '<%= language-id %>'
}
},
languageDef: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const setupConfigExtended = (): UserConfig => {
codeResources: {
main: {
text: '// <%= RawLanguageName %> is running in the web!',
uri: '/workspace/hello-world.<%= file-extension %>',
uri: '/workspace/hello-world.<%= file-glob-extension %>',
}
},
extensions: [{
Expand All @@ -29,7 +29,7 @@ export const setupConfigExtended = (): UserConfig => {
languages: [{
id: '<%= language-id %>',
extensions: [
'.<%= language-id %>'
'.<%= file-glob-extension %>'
],
configuration: './language-configuration.json'
}],
Expand All @@ -41,7 +41,7 @@ export const setupConfigExtended = (): UserConfig => {
}
},
filesOrContents: extensionFilesOrContents,
}],
}],
userConfiguration: {
json: JSON.stringify({
'workbench.colorTheme': 'Default Dark Modern',
Expand Down
6 changes: 2 additions & 4 deletions packages/generator-langium/test/yeoman-generator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,9 @@ const PACKAGE_JSON_EXPECTATION_WEB: Record<string, any> = {
files: ['out', 'src'],
scripts: {
'build': 'vite build',
'bundle:serve': 'http-server ./dist --port 5175',
'dev': 'vite',
'dev:debug': 'vite --debug --force',
'serve': 'npm run dev'
'serve': 'vite preview'
},
dependencies: {
'@codingame/monaco-vscode-editor-service-override': '~5.2.0',
Expand All @@ -316,8 +315,7 @@ const PACKAGE_JSON_EXPECTATION_WEB: Record<string, any> = {
},
devDependencies: {
'@codingame/esbuild-import-meta-url-plugin': '~1.0.2',
'vite': '~5.2.13',
'http-server': '~14.1.1'
'vite': '~5.2.13'
},
volta: {
node: '18.20.3',
Expand Down

0 comments on commit 8931941

Please sign in to comment.