Skip to content

Commit 4af060a

Browse files
Merge pull request #19 from q-masters/development
v1.2.0
2 parents 693105f + 65c5f15 commit 4af060a

File tree

8 files changed

+310
-194
lines changed

8 files changed

+310
-194
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,22 @@ Furthermore, javascript files can now be started directly via vscode in electron
2626

2727
## Usage
2828

29-
This is more designed as a service, that means you can install electron but it will not help alot. These is an example how this could be used inside your extension @see [Vscode-Electron-Demo](https://github.com/q-masters/vscode-electron-demo) how this could be used inside an extension.
29+
This is more designed as a service, that means you can install electron but it will not help alot. These is an example how this could be used inside your extension @see [Vscode-Electron-Demo](https://github.com/q-masters/vscode-electron-demo) and [Run Electron Command](https://github.com/q-masters/vscode-electron-demo/blob/566f8addc5844df651de5100f99ce08116fba1bb/src/lib/extension/commands/open-uri.ts#L16) how this could be used inside an extension.
30+
31+
## API
32+
33+
CommandParams
34+
35+
```ts
36+
type EventParams = ...string[] | { version: string, args: string[] }
37+
```
3038
3139
## Commands
3240
33-
|name|params|type|description|
41+
|name|params|return value|description|
3442
|-|-|-|-|
35-
|qmasters:electron.install|-|void|checks for a valid installation and install electron is nothing exists|
36-
|qmasters:electron.run|string, \[...string\[\]\]|ChildProcess|filepath which should executed [@example](https://github.com/electron/electron-quick-start/blob/master/main.js), additional params which should passed to electron app|
37-
43+
|qmasters:electron.install|[version:string]|boolean| install passed version of electron for example v11.2.0. Default latest version which can found for electron|
44+
|qmasters:electron.run|EventParams|ChildProcess| starts electron app in specific version, all arguments passed as **...string[]** will directly passed to electron as command line arguments. Alternate to use a specific version use **{ version: string, args: string[]}** for example **{ version: "v11.2.0", args: ["file_to_execute.js", "second param"]}**. It will allways check the version which should be used is installed, if not it will install directly. If no version is passed it will take allways the latest version and install if required.|
3845
## Development
3946
4047
- go into src directory

src/README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,22 @@ Furthermore, javascript files can now be started directly via vscode in electron
2626

2727
## Usage
2828

29-
This is more designed as a service, that means you can install electron but it will not help alot. These is an example how this could be used inside your extension @see [Vscode-Electron-Demo](https://github.com/q-masters/vscode-electron-demo) how this could be used inside an extension.
29+
This is more designed as a service, that means you can install electron but it will not help alot. These is an example how this could be used inside your extension @see [Vscode-Electron-Demo](https://github.com/q-masters/vscode-electron-demo) and [Run Electron Command](https://github.com/q-masters/vscode-electron-demo/blob/566f8addc5844df651de5100f99ce08116fba1bb/src/lib/extension/commands/open-uri.ts#L16) how this could be used inside an extension.
30+
31+
## API
32+
33+
CommandParams
34+
35+
```ts
36+
type EventParams = ...string[] | { version: string, args: string[] }
37+
```
3038
3139
## Commands
3240
33-
|name|params|type|description|
41+
|name|params|return value|description|
3442
|-|-|-|-|
35-
|qmasters:electron.install|-|void|checks for a valid installation and install electron is nothing exists|
36-
|qmasters:electron.run|string, \[...string\[\]\]|ChildProcess|filepath which should executed [@example](https://github.com/electron/electron-quick-start/blob/master/main.js), additional params which should passed to electron app|
37-
43+
|qmasters:electron.install|[version:string]|boolean| install passed version of electron for example v11.2.0. Default latest version which can found for electron|
44+
|qmasters:electron.run|EventParams|ChildProcess| starts electron app in specific version, all arguments passed as **...string[]** will directly passed to electron as command line arguments. Alternate to use a specific version use **{ version: string, args: string[]}** for example **{ version: "v11.2.0", args: ["file_to_execute.js", "second param"]}**. It will allways check the version which should be used is installed, if not it will install directly. If no version is passed it will take allways the latest version and install if required.|
3845
## Development
3946
4047
- go into src directory

src/lib/api.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ import { InjectionToken } from "tsyringe";
22
import * as vscode from "vscode";
33

44
export const ELECTRON_INSTALL_PATH: InjectionToken<string> = Symbol(`electron download path`)
5-
export const ELECTRON_VERSION: InjectionToken<string> = Symbol(`electron version`)
65
export const OUTPUT_CHANNEL: InjectionToken<vscode.OutputChannel> = Symbol(`Output channel`)
6+
export const ELECTRON_ENV_VARS: InjectionToken<any> = Symbol(`Environment variables for spawn`)
7+
8+
export declare type DATA_NODE = {[key: string]:string}
9+
export declare type EventParams = string[] | { version: string, args: string[] }

0 commit comments

Comments
 (0)