Skip to content

Commit a09126d

Browse files
committed
build script
1 parent f511138 commit a09126d

File tree

7 files changed

+486
-1281
lines changed

7 files changed

+486
-1281
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules
22
*.vsix
33
client/out
44
server/out
5+
dist

client/src/extension.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const SECTION = "\u00A7";
2424
export function activate(context: ExtensionContext) {
2525
// The server is implemented in node
2626
const serverModule = context.asAbsolutePath(
27-
path.join('server', 'out', 'server.js')
27+
path.join("dist", 'source-lsp.js')
2828
);
2929

3030
// If the extension is launched in debug mode then the debug server options are used
@@ -45,7 +45,7 @@ export function activate(context: ExtensionContext) {
4545
// Notify the server about file changes to '.clientrc files contained in the workspace
4646
fileEvents: workspace.createFileSystemWatcher('**/.clientrc')
4747
},
48-
traceOutputChannel: window.createOutputChannel("Your Language Server Trace")
48+
traceOutputChannel: window.createOutputChannel("source-lsp trace")
4949
};
5050

5151
// Create the language client and start the client.

esbuild.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const esbuild = require("esbuild");
2+
3+
esbuild.build({
4+
entryPoints: ["server/src/server.ts"], // Adjust if your main entry file is different
5+
bundle: true,
6+
platform: "node",
7+
format: "cjs", // Ensure CommonJS format
8+
outfile: "./dist/source-lsp.js",
9+
external: ["vscode"], // Avoid bundling VSCode module
10+
sourcemap: true, // Optional: Generates a source map for debugging
11+
}).catch(() => process.exit(1));
12+
13+
console.log("Built successfully")

0 commit comments

Comments
 (0)