-
Notifications
You must be signed in to change notification settings - Fork 36
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
43 changed files
with
1,264 additions
and
465 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
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,16 @@ | ||
# thing-editor integration | ||
|
||
|
||
[Thing-Editor](https://github.com/Megabyteceer/thing-editor) integration extensions. | ||
|
||
|
||
For now its just reapply breakpoints after game classes dynamic reloading. | ||
|
||
extension accepts commands via http requests: | ||
http://127.0.0.1:32025/classes-reloaded&my-game-name | ||
|
||
But you don`t have to send them. They will be send automatically. | ||
|
||
|
||
## changes log | ||
1.0.2 activate extension if thing-editor workspace open only. |
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,34 @@ | ||
var vscode = require('vscode'); | ||
|
||
function activate(_context) { | ||
|
||
let popStackRequired = false; | ||
|
||
vscode.debug.registerDebugAdapterTrackerFactory('*', { | ||
createDebugAdapterTracker(session) { | ||
return { | ||
onWillReceiveMessage: (m) => { | ||
//console.log(`,${JSON.stringify(m, undefined, 2)}`); | ||
session.name; | ||
}, | ||
onDidSendMessage: (m) => { | ||
if(m.command === 'stackTrace') { | ||
const stackFrame = m.body.stackFrames[0]; | ||
if(stackFrame && stackFrame.name && stackFrame.name.endsWith('_thing_editor_debug_helper')) { | ||
popStackRequired = true; | ||
} | ||
} else if(popStackRequired && m.command === 'scopes') { | ||
popStackRequired = false; | ||
vscode.commands.executeCommand('workbench.action.debug.callStackDown'); | ||
} | ||
//console.log(`,${JSON.stringify(m, undefined, 2)}`); | ||
} | ||
}; | ||
} | ||
}); | ||
} | ||
exports.activate = activate; | ||
|
||
module.exports = { | ||
activate | ||
}; |
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,34 @@ | ||
{ | ||
"name": "thing-editor-integration", | ||
"displayName": "Thing-Editor integration", | ||
"description": "thing-editor integration", | ||
"publisher": "VasiliyKostin", | ||
"repository": "https://github.com/Megabyteceer/thing-editor", | ||
"version": "1.0.4", | ||
"engines": { | ||
"vscode": "^1.43.0" | ||
}, | ||
"categories": [ | ||
"Other" | ||
], | ||
"activationEvents": [ | ||
"workspaceContains:./thing-editor.code-workspace" | ||
], | ||
"main": "./extension.js", | ||
"scripts": { | ||
"lint": "eslint .", | ||
"pretest": "npm run lint", | ||
"test": "node ./test/runTest.js" | ||
}, | ||
"devDependencies": { | ||
"@types/glob": "^7.1.1", | ||
"@types/mocha": "^7.0.1", | ||
"@types/node": "^12.11.7", | ||
"@types/vscode": "^1.43.0", | ||
"eslint": "^6.8.0", | ||
"glob": "^7.1.6", | ||
"mocha": "^7.0.1", | ||
"typescript": "^3.7.5", | ||
"vscode-test": "^1.3.0" | ||
} | ||
} |
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,37 @@ | ||
const ifDefPlugin = require('./vite-plugin-ifdef/if-def-loader.js'); | ||
const path = require('path'); | ||
const {ViteImageOptimizer} = require('vite-plugin-image-optimizer'); | ||
|
||
module.exports = (root, publicDir, outDir, debug, _projectDesc) => { | ||
return { | ||
root: root + '/.tmp', | ||
publicDir, | ||
base: './', | ||
esbuild: { | ||
target: 'ES2015' | ||
}, | ||
plugins: [ | ||
ifDefPlugin(debug), | ||
ViteImageOptimizer({}) | ||
], | ||
build: { | ||
target: 'ES2015', | ||
emptyOutDir: true, | ||
minify: !debug, | ||
outDir, | ||
rollupOptions: { | ||
input: '' | ||
}, | ||
}, | ||
resolve: { | ||
alias: { | ||
'game-root': root, | ||
'games': path.resolve(__dirname, '../../games'), | ||
'libs': path.resolve(__dirname, '../../libs'), | ||
'thing-editor': path.resolve(__dirname, '../../thing-editor'), | ||
'howler.js': 'https://cdn.jsdelivr.net/npm/howler@2.2.3/dist/howler.min.js', | ||
'pixi.js': 'https://cdn.jsdelivr.net/npm/pixi.js-legacy@7.2.4/dist/pixi-legacy.min.mjs' | ||
} | ||
} | ||
}; | ||
}; |
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
Oops, something went wrong.