Skip to content

Commit 9185ccd

Browse files
committed
feat(vscode): preview of Robot Framework Notebook support for VSCode
1 parent 170287d commit 9185ccd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+5412
-1299
lines changed

.vscode/launch.json

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@
55
{
66
"version": "0.2.0",
77
"configurations": [
8+
{
9+
"name": "Attach to Node Process",
10+
"port": 9229,
11+
"request": "attach",
12+
"skipFiles": [
13+
"<node_internals>/**"
14+
],
15+
"type": "node",
16+
"autoAttachChildProcesses": true
17+
},
18+
19+
20+
{
21+
"name": "esbuild.mjs",
22+
"program": "${workspaceFolder}/esbuild.mjs",
23+
"request": "launch",
24+
"skipFiles": [
25+
"<node_internals>/**"
26+
],
27+
"type": "node",
28+
"console": "integratedTerminal",
29+
"runtimeArgs": [
30+
"--experimental-modules"
31+
]
32+
},
833
{
934
"name": "Python: Debug in terminal",
1035
"type": "debugpy",
@@ -53,9 +78,10 @@
5378
// "suites",
5479
// // "discover", "tests", "--tags"
5580
// "."
56-
// "discover",
57-
// "files",
58-
// ".."
81+
"discover",
82+
"--no-diagnostics",
83+
"all",
84+
".."
5985
// "config",
6086
// "show",
6187
// "discover",
@@ -66,9 +92,10 @@
6692
// "E:\\source\\uvtestprj\\tests\\first.robotrepl"
6793
// "analyze",
6894
// "code",
69-
"--help"
95+
// "--help"
7096
// "tests"
71-
//"repl",
97+
// "repl-server",
98+
// "package.json"
7299
// "-v",
73100
// "asd:asd"
74101

@@ -185,6 +212,8 @@
185212
"args": [
186213
"--extensionDevelopmentPath=${workspaceFolder}",
187214
],
215+
"debugWebviews": true,
216+
"debugWebWorkerHost": true,
188217
"outFiles": [
189218
"${workspaceFolder}/out/**/*.js"
190219
],

.vscodeignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pyproject.toml
3939
**/playground/
4040

4141
# svg files
42-
**/*.svg
42+
#**/*.svg
4343

4444
# coverage
4545
.coverage

esbuild.mjs

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import * as esbuild from "esbuild";
2+
import * as process from "process";
3+
import { typecheckPlugin } from "@jgoz/esbuild-plugin-typecheck";
4+
/**
5+
* @type {import('esbuild').LogLevel}
6+
*/
7+
const LOG_LEVEL = "error";
8+
9+
/**
10+
* @type {boolean}
11+
*/
12+
const production = process.argv.includes("--production");
13+
14+
/**
15+
* @type {import('esbuild').BuildOptions[]}
16+
*/
17+
const projects = [
18+
{
19+
entryPoints: ["./vscode-client/extension"],
20+
format: "cjs",
21+
platform: "node",
22+
outfile: "out/extension.js",
23+
external: ["vscode"],
24+
},
25+
{
26+
entryPoints: ["./vscode-client/rendererHtml"],
27+
format: "esm",
28+
platform: "browser",
29+
outfile: "out/rendererHtml.js",
30+
external: ["vscode"],
31+
loader: {
32+
".jstemp": "text",
33+
".csstemp": "text",
34+
},
35+
},
36+
{
37+
entryPoints: ["./vscode-client/rendererLog"],
38+
format: "esm",
39+
platform: "browser",
40+
outfile: "out/rendererLog.js",
41+
external: ["vscode"],
42+
loader: {
43+
".ttf": "file",
44+
".css": "text",
45+
},
46+
},
47+
];
48+
49+
/**
50+
*
51+
* @param {import('esbuild').BuildOptions} project
52+
*/
53+
async function buildProject(project) {
54+
const ctx = await esbuild.context({
55+
bundle: true,
56+
minify: production,
57+
sourcemap: !production,
58+
sourcesContent: false,
59+
logLevel: LOG_LEVEL,
60+
61+
...project,
62+
63+
plugins: [
64+
typecheckPlugin({ configFile: project.entryPoints[0] + "/tsconfig.json" }),
65+
/* add to the end of plugins array */
66+
//esbuildProblemMatcherPlugin,
67+
],
68+
});
69+
70+
await ctx.rebuild();
71+
await ctx.dispose();
72+
}
73+
74+
async function main() {
75+
for (const project of projects) {
76+
await buildProject(project);
77+
}
78+
}
79+
80+
main().catch((e) => {
81+
console.error(e);
82+
process.exit(1);
83+
});

eslint.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ export default [
1717
"**/.pytest_cache/",
1818
"**/site/",
1919
"**/docs/",
20+
"**/packages/",
21+
"**/js",
2022
],
2123
},
22-
{ files: ["**/*.{js,mjs,cjs,ts}"] },
24+
{ files: ["**/*.{ts,tsx}"] },
2325
{ languageOptions: { globals: globals.browser } },
2426
pluginJs.configs.recommended,
2527
...tseslint.configs.recommended,

hatch.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ only-include = ["src", "CHANGELOG.md"]
1313

1414

1515
[envs.default]
16-
installer = "uv"
16+
#installer = "uv"
1717
dependencies = [
1818
"pytest",
1919
"pytest-html",

0 commit comments

Comments
 (0)