deanishe Posted April 16, 2017 Share Posted April 16, 2017 (edited) 2 minutes ago, pier said: Yes, that was what I was suggesting. Why not give it a try then and find out? I'm sure a lot of people would be interested to know if it works. Edited April 16, 2017 by deanishe Link to comment
pier Posted April 16, 2017 Author Share Posted April 16, 2017 3 minutes ago, deanishe said: Why not give it a try then and find out? I'm sure a lot of people would be interested to know if it works. How could I? AFAIK this would have to be compiled with Alfred's code. Link to comment
deanishe Posted April 16, 2017 Share Posted April 16, 2017 (edited) 6 minutes ago, pier said: How could I? AFAIK this would have to be compiled with Alfred's code. Not at all. You do it exactly like I just described (using Language = /bin/bash). If you can run it from a shell, you can run it from Alfred (with some minor complications due to the stripped-down environment). Alfred doesn't have built-in support for any language (apart from a bit of AppleScript). It just runs whichever program you point it at using precisely the same mechanism as child_process in Node. Edited April 16, 2017 by deanishe Link to comment
pier Posted April 16, 2017 Author Share Posted April 16, 2017 1 minute ago, deanishe said: Not at all. You do it exactly like I just described (using Language = /bin/bash). If you can run it from a shell, you can run it from Alfred (with some caveats due to the stripped-down environment). Alfred doesn't have built-in support for any language (apart from a bit of AppleScript). It just runs whichever program you point it at using precisely the same mechanism as child_process in Node. Um I'm not following you. We are talking about Nodekit, right? Yes I could just node whatever.js but the problem of distributing workflows that use node would still persist. On a side note. Is there a way of showing a message to the user from the workflow and inform Node is needed? Link to comment
deanishe Posted April 16, 2017 Share Posted April 16, 2017 5 minutes ago, pier said: Um I'm not following you. We are talking about Nodekit, right? We're talking about everything. If you can run it in a shell, you can paste the same command in Alfred's Code box (with Language = /bin/bash) and Alfred will run it. (With some caveats due to Alfred not using your shell's environment.) Alfred doesn't care what language your workflow is written in. 5 minutes ago, pier said: the problem of distributing workflows that use node would still persist. The only problem is that Node isn't installed by default. If you're using something that isn't as huge as Node, you can include it in the workflow itself, thereby solving the problem. 6 minutes ago, pier said: On a side note. Is there a way of showing a message to the user from the workflow and inform Node is needed? Yes. Plenty of ways. An Alfred notification. A Large Type output. An AppleScript dialog box. Put this in a Run Script action (Language = /bin/bash) and connect it to a Post Notification output with the option "Only show if the input has content": test -f /usr/local/bin/node || echo "Node not installed" Link to comment
pier Posted April 16, 2017 Author Share Posted April 16, 2017 Thanks all for your support and the nice conversation. vitor 1 Link to comment
deanishe Posted April 16, 2017 Share Posted April 16, 2017 (edited) Let us know if you get anywhere with NodeKit. It'd be awesome if Node workflows could work without Node. I just tried running the sample project, but it's broken. Edited April 16, 2017 by deanishe Link to comment
deanishe Posted April 16, 2017 Share Posted April 16, 2017 Got it running. A basic app is only ~12 MB. That's a damn sight better than 100+ MB for Electron. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now