Skip to content

Commit

Permalink
Update for JavaScript/TypeScript Node.js setup (Flow-Launcher#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjw24 authored Feb 23, 2023
1 parent 37576ef commit 8e7a3e8
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
32 changes: 16 additions & 16 deletions how-to-create-a-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The theme file allows you to set the following parts. Each style has a key, and

</br>

#### WindowBorderStyle
### WindowBorderStyle

In this item, you can set the color, border size, border color, and corner radius of the basic window.

Expand All @@ -35,7 +35,7 @@ Window border thickness is recommended from 1 or 2. Corner radius recommends 0,

</br>

#### QueryBoxStyle
### QueryBoxStyle

This is the style of the basic search window. You can set the font size, color of cursor, font color, input window height. If the font size is reduced, the height of the window is also reduced, so the height must be specified.

Expand All @@ -52,7 +52,7 @@ This is the style of the basic search window. You can set the font size, color o

</br>

#### QuerySuggestionBoxStyle
### QuerySuggestionBoxStyle

This is the style of the recommended search word that appears after the search word. The font size & Height should be the same as the QueryBoxStyle, and a more translucent color is recommended.

Expand All @@ -67,7 +67,7 @@ This is the style of the recommended search word that appears after the search w

</br>

#### PendingLineStyle
### PendingLineStyle

It is possible to set the color of the loading bar that is sometimes displayed.

Expand All @@ -79,7 +79,7 @@ It is possible to set the color of the loading bar that is sometimes displayed.

</br>

#### SearchIconStyle
### SearchIconStyle

This is the style of the magnifying glass icon displayed on the right side of the search window. Color & Size can be changed or hidden. (The picture change will be updated later.)

Expand All @@ -99,7 +99,7 @@ If you want to hide it, you can add the following code.

</br>

#### ItemTitleStyle
### ItemTitleStyle

This is the title part of the search result. The font size and color can be adjusted.

Expand All @@ -112,7 +112,7 @@ This is the title part of the search result. The font size and color can be adju

</br>

#### ItemTitleSelectedStyle
### ItemTitleSelectedStyle

You can specify a color that changes when the item is focused. The font size should be the same as ItemTitleStyle.

Expand All @@ -124,7 +124,7 @@ You can specify a color that changes when the item is focused. The font size sho

</br>

#### ItemSubTitleStyle
### ItemSubTitleStyle

This is the filepath part of the search result. The font size and color can be adjusted.

Expand All @@ -137,7 +137,7 @@ This is the filepath part of the search result. The font size and color can be a

</br>

#### ItemSubTitleSelectedStyle
### ItemSubTitleSelectedStyle

You can specify a color that changes when the item is focused. The font size should be the same as ItemSubTitleStyle.

Expand All @@ -150,7 +150,7 @@ You can specify a color that changes when the item is focused. The font size sho

</br>

#### ItemHotkeyStyle
### ItemHotkeyStyle

Specifies the color and size of the Hotkey font.

Expand All @@ -163,7 +163,7 @@ Specifies the color and size of the Hotkey font.

</br>

#### ItemHotkeySelectedStyle
### ItemHotkeySelectedStyle

You can specify a color that changes when the item is focused. The font size should be the same as ItemHotkeyStyle.

Expand All @@ -176,15 +176,15 @@ You can specify a color that changes when the item is focused. The font size sho

</br>

#### ItemSelectedBackgroundColor
### ItemSelectedBackgroundColor

This is the background color that is emphasized when the item is selected.

```<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#3c454e</SolidColorBrush>```

</br>

#### HighlightStyle
### HighlightStyle

It emphasizes the part where the search word matches the result. Color and Font Weight can be set.

Expand All @@ -197,7 +197,7 @@ It emphasizes the part where the search word matches the result. Color and Font

</br>

#### ThumbStyle
### ThumbStyle

Specifies the color and size of the scroll bar.

Expand All @@ -220,7 +220,7 @@ Specifies the color and size of the scroll bar.

</br>

#### SeparatorStyle
### SeparatorStyle

Set the size, height, color, and margin of the horizontal line.If you don't think you need it, you can get rid of it.

Expand All @@ -238,7 +238,7 @@ If you want to hide it, you can add the following code.

</br>

#### ItemGlyph
### ItemGlyph

Specifies the color of the glyph icon.

Expand Down
2 changes: 1 addition & 1 deletion nodejs-develop-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ When building a Node.js plugins there are several things to be mindful of:
2. Publish all as a zip- zip up your project including a lib directory that contains the modules and publish it to GitHub Releases page.
3. Point your module path to the node_modules directory- reference all the modules to that directory.

* Currently we will require users to install Node.js on the computer in order to use the plugin, so you will need to explain how to do so in your plugin readme.
* Users can use their system-installed Node.js with Flow Launcher, but in most circumstances, they will most likely be using Flow Launcher's download of [Node.js](https://nodejs.org/dist/v16.18.0/node-v16.18.0-win-x64.zip)). This download of portable Node.js version is isolated from the user's system and can be simply removed.

### Simple Example
Have a look at this simple example plugin [here](https://github.com/Flow-Launcher/Flow.Launcher.Plugin.HelloWorldNodeJS), notice it has a folder called '.github/workflows' and a file called 'Publish Release.yml'. This is the workflow file that GitHub Workflow uses to run the CICD for the project. Moving out of that folder you can go into the [main.js](https://github.com/Flow-Launcher/Flow.Launcher.Plugin.HelloWorldNodeJS/blob/main/main.js) file, this is the entry file for your plugin.
4 changes: 2 additions & 2 deletions plugin.json.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ It must be in the plugin root directory.
"Description":"", //Plugin description
"Author":"", //Plugin Author
"Version":"", //Plugin version (e.g. 1.0.0). It is important for plugin update checking.
"Language":"", //Plugin language,we support csharp/fsharp, python and executable now
"Language":"", //Plugin language,available fields are csharp, fsharp, python, javascript, typescript and executable. Make sure you put the correct field for your plugin language, this is important so that the required runtime environment can be setup automatically.
"Website":"", //Plugin website or author website
"IcoPath": "", //Plugin icon, relative path to the pluign folder
"ExecuteFileName":"" //Execution entry. dll name for C#/F# plugin, and python file for python plugin, .exe or other executable for executable plugin
"ExecuteFileName":"" //Execution entry. dll extension for C#/F# plugin, .py for python plugin, .js/.ts for JS/TS plugins and .exe or other executable for executable plugin. Path examples include "main.py" or "./dist/main.js"
}
```
2 changes: 1 addition & 1 deletion port-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### Notes

- When porting, please keep the author's commit history
- Flow Launcher targets .Net 5, so plugins should also be upgraded to keep the continuity of future developments
- Flow Launcher targets minimum .Net 5, so older plugins should be upgraded to keep the continuity of their future developments
- All dll libraries used by the plugin should be outputted and included in the final build, to do this, set the attribute CopyLocalLockFileAssemblies in your project file to true

### Steps
Expand Down
2 changes: 1 addition & 1 deletion py-develop-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ When building a Python plugins there are several things to be mindful of:
2. Publish all as a zip- zip up your project including a lib directory that contains the modules and publish it to GitHub Releases page.
3. Point your module imports to the lib directory- reference all the modules to that directory where they are first imported.

* User can use their own system installed Python with Flow Launcher. But in most circumstances they will most likely be using Flow Launcher's own embedded Python executable. [Embedded Python](https://docs.python.org/3/using/windows.html#the-embeddable-package) is isolated from the users system and does not prepend the scripts run directory to the system `PATH`.<sup>[ref](https://bugs.python.org/issue28245)</sup> If you need to import external files please follow the example below.
* Users can use their own system-installed Python with Flow Launcher, but in most circumstances they will most likely be using Flow Launcher's download of [Embedded Python](https://docs.python.org/3/using/windows.html#the-embeddable-package). This download is isolated from the users system and does not prepend the scripts run directory to the system `PATH`.<sup>[ref](https://bugs.python.org/issue28245)</sup> If you need to import external files please follow the example below.

### Simple Example
Have a look at this simple example plugin [here](https://github.com/Flow-Launcher/Flow.Launcher.Plugin.HelloWorldPython), notice it has a folder called '.github/workflows' and a file called 'Publish Release.yml'. This is the workflow file that GitHub Workflow uses to run the CICD for the project. Moving out of that folder you can go into the [main.py](https://github.com/Flow-Launcher/Flow.Launcher.Plugin.HelloWorldPython/blob/main/main.py) file, this is the entry file for your plugin. Notice it has this code block:
Expand Down

0 comments on commit 8e7a3e8

Please sign in to comment.