Skip to content

Commit

Permalink
VSC-462 Set up webview building
Browse files Browse the repository at this point in the history
  • Loading branch information
HampusAdolfsson committed Jun 19, 2024
1 parent 83f5053 commit dcb4e14
Show file tree
Hide file tree
Showing 13 changed files with 320 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"files": ["*.ts", "*.tsx"],
"parserOptions": {
"project": ["./tsconfig.json"]
"project": ["./src/tsconfig.json"]
}
}
],
Expand Down
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/samples/GettingStarted"
],
"outFiles": [ "${workspaceFolder}/dist/**/*.js" ]
"outFiles": [ "${workspaceFolder}/dist/**/*.js" ],
"debugWebviews": true
},
{
"name": "Run Debugger Tests",
Expand Down
1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

# Include only the files that should be in the .vsix
!dist/extension.js
!dist/webviews/**/*
!README.md
!CHANGELOG.md
!LICENSE
Expand Down
210 changes: 210 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@
"@types/node-int64": "^0.4.29",
"@types/thrift": "^0.10.9",
"@types/vscode": "1.64.0",
"@types/vscode-webview": "^1.57.5",
"@typescript-eslint/eslint-plugin": "^5.2.0",
"@typescript-eslint/parser": "^5.2.0",
"@typescript/lib-dom": "npm:@types/web@^0.0.69",
"@vscode/debugadapter-testsupport": "^1.57.0",
"copy-webpack-plugin": "^12.0.2",
"eslint": "^8.1.0",
"eslint-plugin-deprecation": "^1.3.2",
"husky": "^7.0.4",
Expand All @@ -81,10 +83,10 @@
"scripts": {
"lint": "eslint . --ext .ts && markdownlint **/*.md --ignore node_modules",
"vscode:prepublish": "npm run package",
"webpack": "webpack --mode development",
"webpack-watch": "webpack --mode development --watch",
"package": "webpack --mode production --devtool hidden-source-map",
"test-compile": "npm run webpack && tsc -p ./",
"webpack": "webpack --mode development --config-name extension --config-name webviews",
"webpack-watch": "webpack --mode development --watch --config-name extension --config-name webviews",
"package": "webpack --mode production --devtool hidden-source-map --config-name extension --config-name webviews",
"test-compile": "npm run webpack && tsc -p ./src",
"prepare": "husky install"
},
"main": "./dist/extension",
Expand Down
7 changes: 7 additions & 0 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../tsconfig.base.json",
"include": [
"**/*",
"../tests/**/*"
]
}
4 changes: 0 additions & 4 deletions tsconfig.json → tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
"noUncheckedIndexedAccess": true, /* Add 'undefined' to the type returned from indexed accesses */
"isolatedModules": true, /* Recommended when using bundlers */
},
"include": [
"src/**/*",
"tests/**/*"
],
"exclude": [
"out/**/*",
"node_modules",
Expand Down
Loading

0 comments on commit dcb4e14

Please sign in to comment.