Skip to content

Commit

Permalink
feat: built-in library (#557)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lars-reimann and megalinter-bot authored Sep 8, 2023
1 parent f58bf20 commit 7998eb1
Show file tree
Hide file tree
Showing 20 changed files with 577 additions and 31 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ module.exports = {
extends: '@lars-reimann',
rules: {
'import/extensions': 'off',
'vitest/prefer-lowercase-title': 'off',
},
};
31 changes: 21 additions & 10 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';

const watch = process.argv.includes('--watch');
const minify = process.argv.includes('--minify');
Expand All @@ -15,16 +16,26 @@ const padZeroes = function (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({
// resolveFrom: 'cwd',
assets: {
from: ['./src/resources/**/*'],
to: ['./resources'],
},
watch,
}),
];

const ctx = await esbuild.context({
// Entry points for the vscode extension and the language server
Expand All @@ -38,7 +49,7 @@ const ctx = await esbuild.context({
outExtension: {
'.js': '.cjs'
},
loader: { '.ts': 'ts' },
loader: {'.ts': 'ts'},
external: ['vscode'],
platform: 'node',
sourcemap: !minify,
Expand Down
Loading