-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add "Install Hermione" action #1
Conversation
3b5391d
to
f6e5182
Compare
@@ -0,0 +1,4 @@ | |||
vscode.d.ts | |||
vscode.proposed.d.ts | |||
out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The result of the build extension is added to this folder - out
@@ -0,0 +1,18 @@ | |||
module.exports = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use from hermione
contact_links: | ||
- name: File an issue | ||
url: https://github.com/gemini-testing/hermione/issues | ||
about: We track issues in the gemini-testing/hermione repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to handle all issues in our hermione repository
out/ | ||
node_modules | ||
.vscode-test/ | ||
*.vsix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bundled file which should be published as vscode extension
.nvmrc
Outdated
@@ -0,0 +1 @@ | |||
20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With lower version I was unable to run the build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
Will i be able to use this extension in my node@18 project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It's only for development.
But looks like it was strange bug and know I can use node@18.
"keybindings": { | ||
"command": "workbench.action.terminal.runSelectedText", | ||
"key": "ctrl+shift+8", | ||
"mac": "cmd+shift+8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should use some another keybinding which is more comfortable to press
}, | ||
"license": "MIT", | ||
"scripts": { | ||
"vscode:prepublish": "npm run esbuild-base -- --minify", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used by vscode
import * as vscode from "vscode"; | ||
|
||
export function activate(context: vscode.ExtensionContext): void { | ||
const disposable = vscode.commands.registerCommand("hrm.install", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
describe command the install hermione in user folder
const disposable = vscode.commands.registerCommand("hrm.install", async () => { | ||
const [workspaceFolder] = vscode.workspace.workspaceFolders || []; | ||
if (!workspaceFolder) { | ||
await vscode.window.showErrorMessage("Open a folder in VS Code to initialize Hermione"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workspace folder must exists
|
||
terminal.show(); | ||
|
||
terminal.sendText(`npm init hermione-app -- --yes`, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run hermione-app without any questions
f6e5182
to
b4093dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise /ok
.nvmrc
Outdated
@@ -0,0 +1 @@ | |||
20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
Will i be able to use this extension in my node@18 project?
.vscode/extensions.json
Outdated
@@ -0,0 +1,7 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's recommended extensions which user can install with main extension. It was installed by default when create default vscode project. I just add connor4312.esbuild-problem-matchers
because I had some problems with correct build extension. Currently everything build without any problems so I just delete it.
.vscode/launch.json
Outdated
"request": "launch", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}", | ||
"${workspaceFolder}/../examples/test-project" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not ${workspaceFolder}/examples/test-project
? I think its more convenient to have examples
folder inside of our project (while it still being included in .gitignore and such)
README.md
Outdated
|
||
## Using the REPL mode | ||
|
||
Adds a keybinding (`cmd+shift+8` for mac and `ctrl+shift+8` for others) to run a dedicated section of code in the VSCode terminal. More infor about [REPL mode][hermione-repl-mode]. You can overwrite this keybinding in [keyboard shortcuts][vscode-keyboard-shortcuts]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "More infor" -> "More info"
package.json
Outdated
"Testing" | ||
], | ||
"activationEvents": [ | ||
"workspaceContains:**/.hermione.conf.{ts,js}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove this event, because **
matches node_modules
, and we don't want this extension to search all over node_modules
. Especially considering:
node_modules/.bin/hermione
is enough- hermione config file could potentially be named in a different way
b4093dd
to
51ff077
Compare
51ff077
to
da5138a
Compare
Add new vscode extension with ability to
Install Hermione
and set keybinding to send code to terminal in REPL mode.Its first base implementation in near future this plugin will be improved significantly.