
sindresorhus
Member-
Content Count
10 -
Joined
-
Last visited
About sindresorhus
-
Rank
Newbie
Recent Profile Visitors
597 profile views
-
sindresorhus reacted to a post in a topic: Workflow libraries and helpers
-
Does the new Workflow make it easier to use node.js?
sindresorhus replied to ferik's topic in Workflow Help & Questions
I'm aware of all this. Was just pointing out that Alfy makes it easier to create workflows using Node.js as it works around that limitation. -
Does the new Workflow make it easier to use node.js?
sindresorhus replied to ferik's topic in Workflow Help & Questions
That's not the user's custom $PATH. That's the default $PATH defined by macOS. And nobody starts Alfred from the command-line. I meant that when Node.js is installed the `node` binary is not available by default, since it's installed in `/usr/local/bin`, which is by default not in the $PATH in Alfred. Alfy works around this by getting the user's $PATH, so running `node` in Alfred just works when Node.js is installed. This is nice as otherwise you would have to instruct users to manually set the location of the `node` binary. -
@deanishe I'm aware of this, but I was looking for a way to do it completely programmatically without having to resort to any more workflow nodes or variables. In Alfy, I would have liked to create some reusable dynamic menus that users could make use of without having to add anything extra in the workflow view.
-
Does the new Workflow make it easier to use node.js?
sindresorhus replied to ferik's topic in Workflow Help & Questions
The hard part about using Node.js with Alfred is that the user's $PATH is not defined, so the `node` command is by default not available. I made a helper library, Alfy, that solves this and adds many useful utility methods. -
Expose workflow version as environment variable
sindresorhus replied to sindresorhus's topic in Alfred Feature Suggestions
Yup, I ended up having to extract it out of the info.plist: https://github.com/sindresorhus/alfy/blob/42c59bc7d53f5d2fcbbfc1d45386bd1d99b2dea9/index.js#L29 -
Currently, if I output the following: {"items": [ { "title": "Foo", "arg": "unicorn" } ]} I have to handle the `unicorn` arg in a connected output action in the workflow. It would be useful to be able to dynamically handle it without needing to create an output action. This can be useful for very dynamic results and creating reusable modules that create output with different actions. I propose adding a `script` property to the JSON format that when specified makes it not pass the output to any connected output action (like `valid: false`) and instead executes the `script` and
-
nikivi reacted to a post in a topic: Find relevant emoji from text
-
Find relevant emoji from some text. Useful when you want an emoji for something, but don't remember where to find it. More on GitHub
-
Search for npm packages with npms.io. Useful for Node.js and front-end developers. More on GitHub