Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added HelloWorldJavascript/Images/app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions HelloWorldJavascript/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const { method, parameters } = JSON.parse(process.argv.slice(2))

if (method === "query") {
console.log({
"result": [{
"Title": "Hello World Javascript",
"Subtitle": `Query: ${parameters}`,
"IcoPath": "Images\\app.png"
}]
})
}
3 changes: 3 additions & 0 deletions HelloWorldJavascript/node.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
SET plugin_dir=%~dp0%
node %plugin_dir%/main.js %*
5 changes: 5 additions & 0 deletions HelloWorldJavascript/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "hello-world-javascript",
"version": "1.0.0",
"description": "Hello World Javascript"
}
12 changes: 12 additions & 0 deletions HelloWorldJavascript/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"ID": "a9dec65b392646c9a8ab55996c930c7b",
"ActionKeyword": "hj",
"Name": "Hello World Javascript",
"Description": "Hello World Javascript",
"Author": "durland",
"Version": "1.0.0",
"Language": "executable",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Flow needs to support the js not in the exe method to run the .js script.

"Website": "https://github.com/Flow-Launcher/plugin-samples",
"ExecuteFileName": "node.bat",
"IcoPath": "Images\\app.png"
}