Skip to content

Commit 7998eb1

Browse files
feat: built-in library (#557)
Closes partially #433 ### Summary of Changes * Add the built-in library from the old Xtext version * Load in into the VS Code workspace --------- Co-authored-by: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com>
1 parent f58bf20 commit 7998eb1

20 files changed

+577
-31
lines changed

.eslintrc.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ module.exports = {
1212
extends: '@lars-reimann',
1313
rules: {
1414
'import/extensions': 'off',
15+
'vitest/prefer-lowercase-title': 'off',
1516
},
1617
};

esbuild.mjs

+21-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ts-check
22
import * as esbuild from 'esbuild';
3+
import { copy } from 'esbuild-plugin-copy';
34

45
const watch = process.argv.includes('--watch');
56
const minify = process.argv.includes('--minify');
@@ -15,16 +16,26 @@ const padZeroes = function (i) {
1516
return i.toString().padStart(2, '0');
1617
}
1718

18-
const plugins = [{
19-
name: 'watch-plugin',
20-
setup(build) {
21-
build.onEnd(result => {
22-
if (result.errors.length === 0) {
23-
console.log(getTime() + success);
24-
}
25-
});
19+
const plugins = [
20+
{
21+
name: 'watch-plugin',
22+
setup(build) {
23+
build.onEnd(result => {
24+
if (result.errors.length === 0) {
25+
console.log(getTime() + success);
26+
}
27+
});
28+
},
2629
},
27-
}];
30+
copy({
31+
// resolveFrom: 'cwd',
32+
assets: {
33+
from: ['./src/resources/**/*'],
34+
to: ['./resources'],
35+
},
36+
watch,
37+
}),
38+
];
2839

2940
const ctx = await esbuild.context({
3041
// Entry points for the vscode extension and the language server
@@ -38,7 +49,7 @@ const ctx = await esbuild.context({
3849
outExtension: {
3950
'.js': '.cjs'
4051
},
41-
loader: { '.ts': 'ts' },
52+
loader: {'.ts': 'ts'},
4253
external: ['vscode'],
4354
platform: 'node',
4455
sourcemap: !minify,

0 commit comments

Comments
 (0)