Skip to content

Commit c75b9e4

Browse files
committed
Changes after code review
1 parent 41dacf4 commit c75b9e4

File tree

5 files changed

+24
-464
lines changed

5 files changed

+24
-464
lines changed

esbuild.js

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ const esbuild = require('esbuild');
33
const path = require('node:path');
44
const os = require('node:os');
55
const { sassPlugin } = require('esbuild-sass-plugin');
6-
const { dtsPlugin } = require('esbuild-plugin-d.ts');
76

87
/** @typedef {import('esbuild').BuildOptions} BuildOptions */
98

109
const args = process.argv.slice(2);
1110
const CLIWatch = args.includes('--watch');
11+
const NoMinify = args.includes('--no-minify');
1212

1313
/** @type {BuildOptions} */
1414
const commonConfig = {
1515
bundle: true,
1616
target: ['es2020'],
17-
minify: true,
17+
minify: !NoMinify,
1818
sourcemap: true,
1919
};
2020

@@ -27,23 +27,6 @@ const debugAdapterRoot = path.join(
2727
);
2828
/** @type {BuildOptions[]} */
2929
const configurations = [
30-
{
31-
entryPoints: [path.join(sourceRoot, 'extension.ts')],
32-
outfile: path.join(__dirname, 'dist', 'extension.cjs.js'),
33-
external: ['vscode'],
34-
format: 'cjs',
35-
platform: 'node',
36-
...commonConfig,
37-
},
38-
{
39-
entryPoints: [path.join(sourceRoot, 'extension.ts')],
40-
outfile: path.join(__dirname, 'dist', 'extension.esm.js'),
41-
external: ['vscode'],
42-
plugins: [dtsPlugin()],
43-
format: 'esm',
44-
platform: 'node',
45-
...commonConfig,
46-
},
4730
{
4831
entryPoints: [path.join(sourceRoot, 'memory', 'client', 'index.tsx')],
4932
outfile: path.join(__dirname, 'dist', 'MemoryBrowser.js'),

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
"url": "https://github.com/eclipse-cdt-cloud/cdt-gdb-vscode/issues"
1515
},
1616
"homepage": "https://github.com/eclipse-cdt-cloud/cdt-gdb-vscode#readme",
17-
"main": "./dist/extension.cjs.js",
18-
"module": "./dist/extension.esm.js",
17+
"main": "./dist/extension",
1918
"types": "./dist/extension.d.ts",
2019
"engines": {
2120
"vscode": "^1.78.0"
@@ -724,6 +723,8 @@
724723
}
725724
},
726725
"scripts": {
726+
"build:tsc": "tsc -b",
727+
"watch:tsc": "tsc -b -w",
727728
"build:esbuild": "node esbuild.js",
728729
"watch:esbuild": "node esbuild.js --watch",
729730
"build": "run-s build:*",
@@ -755,7 +756,6 @@
755756
"@vscode/vsce": "^2.18.0",
756757
"chai": "^4.3.7",
757758
"esbuild": "^0.19.2",
758-
"esbuild-plugin-d.ts": "^1.1.0",
759759
"esbuild-sass-plugin": "^2.13.0",
760760
"eslint": "^8.35.0",
761761
"event-stream": "^4.0.1",
@@ -776,6 +776,7 @@
776776
"dist/**/*.css",
777777
"dist/**/*.css.map",
778778
"dist/**/*.d.ts",
779+
"dist/**/*.d.ts.map",
779780
"src/**/*.ts",
780781
"src/**/*.tsx",
781782
"src/**/*.scss"

src/memory/client/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"extends": "../../../tsconfig.json",
33
"compilerOptions": {
44
"composite": true,
5-
"outDir": "../../../out/memory",
5+
"outDir": "../../../dist/memory",
66
"rootDir": "../",
77
"esModuleInterop": true
88
},

tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"lib": ["es2015", "dom"],
99
"jsx": "react",
1010
"strict": true,
11+
"declaration": true,
12+
"declarationMap": true,
1113
"noImplicitAny": true,
1214
"noImplicitReturns": true,
1315
"noUnusedLocals": true,
@@ -17,5 +19,5 @@
1719
"preserveWatchOutput": true
1820
},
1921
"references": [{ "path": "src/memory/client/tsconfig.json" }],
20-
"exclude": ["**/client/*"]
22+
"exclude": ["**/client/*", "**/dist/*"]
2123
}

0 commit comments

Comments
 (0)