-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
2,858 additions
and
613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
node_modules | ||
.vscode-test/ | ||
out/** | ||
dist/ | ||
node_modules/** | ||
.gitignore | ||
*.vsix | ||
.vscode-test/ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { defineConfig } from '@vscode/test-cli'; | ||
import { defineConfig } from '@vscode/test-cli' | ||
|
||
export default defineConfig({ | ||
files: 'test/**/*.test.js', | ||
}); | ||
files: 'out/test/**/*.test.js', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"ms-vscode.extension-test-runner" | ||
"connor4312.esbuild-problem-matchers", | ||
"ms-vscode.extension-test-runner" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts | ||
"typescript.tsc.autoDetect": "off", | ||
"files.exclude": { | ||
"**/*.rpyc": true, | ||
"**/*.rpa": true, | ||
"**/*.rpymc": true, | ||
"**/cache/": true | ||
"out": true, | ||
"dist": false, | ||
".vscode-test": true | ||
}, | ||
"search.exclude": { | ||
"out": true, | ||
"dist": true, | ||
".vscode-test": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "watch", | ||
"dependsOn": ["npm: watch:tsc", "npm: watch:esbuild"], | ||
"presentation": { | ||
"reveal": "never" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"type": "npm", | ||
"script": "watch:esbuild", | ||
"group": "build", | ||
"problemMatcher": "$esbuild-watch", | ||
"isBackground": true, | ||
"label": "npm: watch:esbuild", | ||
"presentation": { | ||
"group": "watch", | ||
"reveal": "never" | ||
} | ||
}, | ||
{ | ||
"type": "npm", | ||
"script": "watch:tsc", | ||
"group": "build", | ||
"problemMatcher": "$tsc-watch", | ||
"isBackground": true, | ||
"label": "npm: watch:tsc", | ||
"presentation": { | ||
"group": "watch", | ||
"reveal": "never" | ||
} | ||
}, | ||
{ | ||
"type": "npm", | ||
"script": "watch-tests", | ||
"problemMatcher": "$tsc-watch", | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "never", | ||
"group": "watchers" | ||
}, | ||
"group": "build" | ||
}, | ||
{ | ||
"label": "tasks: watch-tests", | ||
"dependsOn": ["npm: watch", "npm: watch-tests"], | ||
"problemMatcher": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
const { context } = require('esbuild') | ||
const { copy } = require('esbuild-plugin-copy') | ||
|
||
const production = process.argv.includes('--production') | ||
const watch = process.argv.includes('--watch') | ||
|
||
/** @type {import('esbuild').Plugin} */ | ||
const esbuildProblemMatcherPlugin = { | ||
name: 'esbuild-problem-matcher', | ||
|
||
setup(build) { | ||
build.onStart(() => { | ||
console.log('[watch] build started') | ||
}) | ||
build.onEnd((result) => { | ||
result.errors.forEach(({ text, location }) => { | ||
console.error(`✘ [ERROR] ${text}`) | ||
console.error( | ||
` ${location.file}:${location.line}:${location.column}:` | ||
) | ||
}) | ||
console.log('[watch] build finished') | ||
}) | ||
}, | ||
} | ||
|
||
async function main() { | ||
const ctx = await context({ | ||
entryPoints: ['src/extension.ts'], | ||
bundle: true, | ||
format: 'cjs', | ||
minify: production, | ||
sourcemap: !production, | ||
sourcesContent: false, | ||
platform: 'node', | ||
outfile: 'dist/extension.js', | ||
external: ['vscode', 'node-window-manager', 'extract-file-icon'], | ||
logLevel: 'silent', | ||
plugins: [ | ||
/* add to the end of plugins array */ | ||
esbuildProblemMatcherPlugin, | ||
copy({ | ||
resolveFrom: 'cwd', | ||
assets: { | ||
from: ['./src/**/*.py'], | ||
to: ['./dist/'], | ||
}, | ||
watch: true, | ||
}), | ||
], | ||
}) | ||
if (watch) { | ||
await ctx.watch() | ||
} else { | ||
await ctx.rebuild() | ||
await ctx.dispose() | ||
} | ||
} | ||
|
||
main().catch((e) => { | ||
console.error(e) | ||
process.exit(1) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,36 @@ | ||
import globals from "globals"; | ||
import globals from 'globals' | ||
|
||
export default [{ | ||
languageOptions: { | ||
globals: { | ||
...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, "off"])), | ||
...globals.commonjs, | ||
...globals.node, | ||
...globals.mocha, | ||
}, | ||
export default [ | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...Object.fromEntries( | ||
Object.entries(globals.browser).map(([key]) => [key, 'off']) | ||
), | ||
...globals.commonjs, | ||
...globals.node, | ||
...globals.mocha, | ||
}, | ||
|
||
ecmaVersion: 2018, | ||
sourceType: "module", | ||
ecmaVersion: 2018, | ||
sourceType: 'module', | ||
|
||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
}, | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
}, | ||
|
||
rules: { | ||
"no-const-assign": "warn", | ||
"no-this-before-super": "warn", | ||
"no-undef": "warn", | ||
"no-unreachable": "warn", | ||
"no-unused-vars": "warn", | ||
"constructor-super": "warn", | ||
"valid-typeof": "warn", | ||
}, | ||
}]; | ||
rules: { | ||
'no-const-assign': 'warn', | ||
'no-this-before-super': 'warn', | ||
'no-undef': 'warn', | ||
'no-unreachable': 'warn', | ||
'no-unused-vars': 'warn', | ||
'constructor-super': 'warn', | ||
'valid-typeof': 'warn', | ||
}, | ||
ignores: ['out', 'dist', '**/*.d.ts', '.vscode-test/'], | ||
}, | ||
] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.