Skip to content

Commit

Permalink
Split into 2 packages (eclipse-cdt-cloud#62)
Browse files Browse the repository at this point in the history
Split cdt-gdb-vscode into 2 packages, 1 which contains the extendable
code the other is the VS code extension itself.

Use Yarn workspaces to allow building both with a single command

Use vsce-yarn-patch to workaround microsoft/vscode-vsce#300
  • Loading branch information
Kummallinen committed Apr 21, 2022
1 parent 528a63d commit 455c60d
Show file tree
Hide file tree
Showing 34 changed files with 1,461 additions and 1,369 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules/
node_modules/
/out/
*/out/
*.vsix
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"name": "cdt-debug-vscode",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"]
"args": ["--extensionDevelopmentPath=${workspaceFolder}/cdt-gdb-vscode/"],
"outFiles": ["${workspaceFolder}/*/out/**/*.js"]
}
]
}
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ TODO

We use yarn to as our package manager. To build, simply do


In workspace root do
```
yarn
yarn build
yarn install
yarn run compile
yarn run vscode:package
```

You can also run the build in watch mode using
Expand Down
12 changes: 12 additions & 0 deletions cdt-gdb-vscode-base/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
insert_final_newline = true
end_of_line = lf
indent_style = space

[*.{js,ts,md,c,cpp,h}]
indent_size = 4

[*.{json,yml}]
indent_size = 2
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
63 changes: 63 additions & 0 deletions cdt-gdb-vscode-base/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "@eclipse-cdt-cloud/cdt-gdb-vscode-base",
"version": "0.0.92",
"description": "VS Code extension for CDT GDB debug adapter",
"publisher": "eclipse-cdt",
"repository": {
"type": "git",
"url": "https://github.com/eclipse-cdt-cloud/cdt-gdb-vscode.git"
},
"author": "Eclipse CDT",
"license": "EPL-2.0",
"icon": "images/cdt_debug_logo.png",
"bugs": {
"url": "https://github.com/eclipse-cdt-cloud/cdt-gdb-vscode/issues"
},
"homepage": "https://github.com/eclipse-cdt-cloud/cdt-gdb-vscode#readme",
"main": "./out/index",
"types": "./out/index.d.ts",
"scripts": {
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "yarn run compile && yarn run lint",
"lint": "eslint src --ext ts",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"cdt-gdb-adapter": "^0.0.16-next",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@types/chai": "^4.3.0",
"@types/mocha": "^9.1.0",
"@types/node": "^17.0.13",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.1",
"chai": "^4.3.6",
"css-loader": "^6.5.1",
"eslint": "^8.7.0",
"event-stream": "^4.0.1",
"node-sass": "^7.0.1",
"npm-run-all": "^4.1.5",
"prettier": "2.5.1",
"sass-loader": "^12.4.0",
"style-loader": "^3.3.1",
"ts-loader": "^9.2.6",
"typescript": "^4.5.5",
"@types/vscode": "^1.1.36",
"webpack": "^5.67.0",
"webpack-cli": "^4.9.2"
},
"files": [
"../NOTICE",
"../LICENSE",
"../README.md",
"../CONTRIBUTING.md",
"out/**/*.js",
"out/**/*.js.map",
"out/**/*.d.ts"
]
}
11 changes: 11 additions & 0 deletions cdt-gdb-vscode-base/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*********************************************************************
* Copyright (c) 2018 QNX Software Systems and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*********************************************************************/
export { MemoryServer } from './memory/server/MemoryServer';
export * from './memory/common/messages';
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions cdt-gdb-vscode-base/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"target": "es2015",
"outDir": "out",
"lib": ["es2015", "dom"],
"jsx": "react",
"strict": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"sourceMap": true,
"preserveWatchOutput": true,
"declaration": true
},
"include": [
"src/**/*.ts"
]
}
12 changes: 12 additions & 0 deletions cdt-gdb-vscode/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
insert_final_newline = true
end_of_line = lf
indent_style = space

[*.{js,ts,md,c,cpp,h}]
indent_size = 4

[*.{json,yml}]
indent_size = 2
4 changes: 4 additions & 0 deletions cdt-gdb-vscode/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
25 changes: 25 additions & 0 deletions cdt-gdb-vscode/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
env: {
node: true,
},
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
};
3 changes: 3 additions & 0 deletions cdt-gdb-vscode/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules/
/out/
*.vsix
3 changes: 3 additions & 0 deletions cdt-gdb-vscode/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
18 changes: 18 additions & 0 deletions cdt-gdb-vscode/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Allows Yarn workspace to work
node_modules
../node_modules
!../node_modules/@eclipse-cdt-cloud/cdt-gdb-vscode-base/out
!../node_modules/@eclipse-cdt-cloud/cdt-gdb-vscode-base/package.json
!../node_modules/cdt-gdb-adapter
# Must be after the Yarn workspace section
adapter
.gitignore
.gitmodules
.vscode
out/*.map
package-lock.json
README.md
src
tsconfig.json
webpack.config.js
*.code-workspace
Loading

0 comments on commit 455c60d

Please sign in to comment.