diff --git a/HelloWorldJavascript/Images/app.png b/HelloWorldJavascript/Images/app.png new file mode 100644 index 0000000..bc5701a Binary files /dev/null and b/HelloWorldJavascript/Images/app.png differ diff --git a/HelloWorldJavascript/main.js b/HelloWorldJavascript/main.js new file mode 100644 index 0000000..e5f2753 --- /dev/null +++ b/HelloWorldJavascript/main.js @@ -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" + }] + }) +} diff --git a/HelloWorldJavascript/node.bat b/HelloWorldJavascript/node.bat new file mode 100644 index 0000000..bc20435 --- /dev/null +++ b/HelloWorldJavascript/node.bat @@ -0,0 +1,3 @@ +@echo off +SET plugin_dir=%~dp0% +node %plugin_dir%/main.js %* diff --git a/HelloWorldJavascript/package.json b/HelloWorldJavascript/package.json new file mode 100644 index 0000000..939a25b --- /dev/null +++ b/HelloWorldJavascript/package.json @@ -0,0 +1,5 @@ +{ + "name": "hello-world-javascript", + "version": "1.0.0", + "description": "Hello World Javascript" +} diff --git a/HelloWorldJavascript/plugin.json b/HelloWorldJavascript/plugin.json new file mode 100644 index 0000000..23ef367 --- /dev/null +++ b/HelloWorldJavascript/plugin.json @@ -0,0 +1,12 @@ +{ + "ID": "a9dec65b392646c9a8ab55996c930c7b", + "ActionKeyword": "hj", + "Name": "Hello World Javascript", + "Description": "Hello World Javascript", + "Author": "durland", + "Version": "1.0.0", + "Language": "executable", + "Website": "https://github.com/Flow-Launcher/plugin-samples", + "ExecuteFileName": "node.bat", + "IcoPath": "Images\\app.png" +}