Skip to content

Commit

Permalink
Return to no bundling on plugin side (#112)
Browse files Browse the repository at this point in the history
Fixes #111
  • Loading branch information
colin-grant-work authored Nov 7, 2023
1 parent 66232f0 commit ad34947
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 51 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
out
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/node_modules/
/out/
/dist/
*.vsix
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/node_modules/
/out/
/dist/
*.vsix
23 changes: 12 additions & 11 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Exclude everything
*
*/

# Include the following:
!images/
!dist/
!LICENSE
!NOTICE
!package.json
!README.md
adapter
.gitignore
.gitmodules
.vscode
dist/**/*.map
**/*.tsbuildinfo
package-lock.json
README.md
src
tsconfig.json
webpack.config.js
*.code-workspace
30 changes: 2 additions & 28 deletions esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,17 @@ const commonConfig = {
sourcemap: CLIDevelopment,
};

const outDir = path.join(__dirname, 'out');
const debugAdapterRoot = path.join(
__dirname,
'node_modules',
'cdt-gdb-adapter',
'dist'
);
const srcDir = path.join(__dirname, 'src');
/** @type {BuildOptions[]} */
const configurations = [
{
entryPoints: [path.join(outDir, 'extension.js')],
outdir: path.join(__dirname, 'dist'),
external: ['vscode'],
format: 'cjs',
platform: 'node',
...commonConfig,
},
{
entryPoints: [path.join(outDir, 'memory', 'client', 'index.js')],
entryPoints: [path.join(srcDir, 'memory', 'client', 'index.tsx')],
outfile: path.join(__dirname, 'dist', 'MemoryBrowser.js'),
plugins: [sassPlugin()],
format: 'iife',
platform: 'browser',
...commonConfig,
},
{
entryPoints: [
path.join(debugAdapterRoot, 'debugAdapter.js'),
path.join(debugAdapterRoot, 'debugTargetAdapter.js'),
],
outdir: path.join(__dirname, 'dist'),
external: os.platform() !== 'linux' ? ['*/pty.node'] : undefined,
loader: { '.node': 'copy' },
format: 'cjs',
platform: 'node',
...commonConfig,
},
];

if (CLIWatch) {
Expand Down
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
{
"type": "gdb",
"label": "GDB",
"program": "./dist/debugAdapter.js",
"program": "./node_modules/cdt-gdb-adapter/dist/debugAdapter.js",
"runtime": "node",
"configurationAttributes": {
"launch": {
Expand Down Expand Up @@ -228,7 +228,7 @@
{
"type": "gdbtarget",
"label": "GDB Target",
"program": "./dist/debugTargetAdapter.js",
"program": "./node_modules/cdt-gdb-adapter/dist/debugTargetAdapter.js",
"runtime": "node",
"configurationAttributes": {
"launch": {
Expand Down Expand Up @@ -726,10 +726,8 @@
"watch:tsc": "tsc -b -w",
"build:esbuild": "node esbuild.js",
"watch:esbuild": "node esbuild.js --watch",
"build": "run-s build:*",
"pre-watch": "yarn build",
"do-watch": "run-p watch:*",
"watch": "run-s pre-watch do-watch",
"build": "run-p build:*",
"watch": "run-p watch:*",
"lint": "eslint . --ext .ts,.tsx",
"format": "prettier --write .",
"format-check": "prettier --check .",
Expand Down
2 changes: 1 addition & 1 deletion src/memory/client/MemoryBrowser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import * as React from 'react';
import { MemoryContents } from 'cdt-gdb-adapter';

import '../../../src/memory/client/MemoryBrowser.scss';
import './MemoryBrowser.scss';
import { messageBroker } from './MessageBroker';

class ForwardIterator implements Iterator<number> {
Expand Down
2 changes: 1 addition & 1 deletion src/memory/client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"composite": true,
"outDir": "../../../out/memory",
"outDir": "../../../dist/memory",
"rootDir": "../",
"esModuleInterop": true
},
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "commonjs",
"moduleResolution": "node",
"target": "es2015",
"outDir": "out",
"outDir": "dist",
"lib": ["es2015", "dom"],
"jsx": "react",
"strict": true,
Expand Down

0 comments on commit ad34947

Please sign in to comment.