Skip to content

Commit

Permalink
move builtins in lib folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ydaveluy committed Aug 17, 2024
1 parent 73ad8ff commit 9c60a61
Show file tree
Hide file tree
Showing 23 changed files with 5,675 additions and 5,494 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
-Dsonar.projectKey=ydaveluy_xsmp-modeler
-Dsonar.organization=ydaveluy
-Dsonar.sources=src/
-Dsonar.exclusions=src/language/generated/*,src/language/builtins.ts,out/**
-Dsonar.exclusions=src/language/generated/*,out/**
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.coverage.exclusions=**/*.test.*
-Dsonar.tests=test/
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ src/language/generated/
coverage/
.scannerwork
sonar-report.xml
*.vsix
*.vsix
*.tgz
21 changes: 0 additions & 21 deletions .vscodeignore

This file was deleted.

File renamed without changes.
28 changes: 19 additions & 9 deletions esbuild.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ts-check
import * as esbuild from 'esbuild';
import { copy } from 'esbuild-plugin-copy'; // Plugin to handle file copying

const watch = process.argv.includes('--watch');
const minify = process.argv.includes('--minify');
Expand All @@ -15,16 +16,25 @@ function padZeroes(i) {
return i.toString().padStart(2, '0');
}

const plugins = [{
name: 'watch-plugin',
setup(build) {
build.onEnd(result => {
if (result.errors.length === 0) {
console.log(getTime() + success);
}
});
const plugins = [
{
name: 'watch-plugin',
setup(build) {
build.onEnd(result => {
if (result.errors.length === 0) {
console.log(getTime() + success);
}
});
},
},
}];
copy({
assets: {
// Copy the 'lib' directory to the 'out' directory
from: './src/lib/*',
to: './lib/',
},
}),
];

const ctx = await esbuild.context({
// Entry points for the vscode extension and the language server
Expand Down
428 changes: 307 additions & 121 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"author": "ydaveluy",
"repository": "https://github.com/ydaveluy/xsmp-modeler",
"type": "module",
"license":"MIT",
"scripts": {
"clean": "shx rm -rf bin/ out/",
"build": "tsc -b tsconfig.src.json && node esbuild.mjs",
Expand Down Expand Up @@ -36,6 +37,7 @@
"@vscode/vsce": "^3.0.0",
"concurrently": "~8.2.1",
"esbuild": "~0.23.0",
"esbuild-plugin-copy": "^2.1.1",
"eslint": "~9.9.0",
"langium-cli": "~3.1.1",
"shx": "~0.3.4",
Expand Down Expand Up @@ -138,9 +140,12 @@
"xsmpproject-cli": "./bin/cli.js"
},
"files": [
"out/*",
"syntaxes/*",
"out/**",
"syntaxes/**",
"icons/**",
"xsmpcat-language-configuration.json",
"xsmpproject-language-configuration.json"
"xsmpproject-language-configuration.json",
"README.md",
"LICENSE.md"
]
}
}
6 changes: 3 additions & 3 deletions src/extension/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { LanguageClientOptions, ServerOptions } from 'vscode-languageclient
import * as vscode from 'vscode';
import * as path from 'node:path';
import { LanguageClient, TransportKind } from 'vscode-languageclient/node.js';
import { builtins } from '../language/builtins.js';
import { builtins, builtInScheme } from '../language/builtins.js';
import { createProjectWizard } from '../language/wizard/wizard.js';

let client: LanguageClient;
Expand Down Expand Up @@ -68,9 +68,9 @@ export class BuiltinLibraryFileSystemProvider implements vscode.FileSystemProvid

static register(context: vscode.ExtensionContext) {
context.subscriptions.push(
vscode.workspace.registerFileSystemProvider('builtin', new BuiltinLibraryFileSystemProvider(), {
vscode.workspace.registerFileSystemProvider(builtInScheme, new BuiltinLibraryFileSystemProvider(), {
isReadonly: true,
isCaseSensitive: false
isCaseSensitive: true
}));
}

Expand Down
Loading

0 comments on commit 9c60a61

Please sign in to comment.