alfred-link
alfred-link copied to clipboard
Add extra features
Translate more values from package.json to info.plist, including support for environment variables.
Hi @danielbayley, first of all, thanks for the PR! I have to admit that I have not yet decided if I really want this. Maybe we should've discussed this first in a new issue. But now that we have the PR, let's discuss it here.
The name
property for instance was first extracted from package.json
but was removed in commit https://github.com/SamVerschueren/alfred-link/commit/52b50cbb493cb4f11854b90f78740532650e2590. The reason for that is when you are developing your workflow, you can call ./node_modules/.bin/alfred-link
which will only symlink and not override these properties. Because then you will have to undo the automated changes from your info.plist before pushing to git which is annoying. But info.plist
needs a name because Alfred will crash if not.
My other remark on this PR is, do we really need to be able to maintain all these properties in package.json
? The reason these properties where chosen was because (1) they already are available in package.json
by default so this deduplicates that information and (2) they can change over time.
So I have to think about this first before I decide. Feel free to throw in arguments in the discussion :).
The name property for instance was first extracted from package.json but was removed in commit 52b50cb. The reason for that is when you are developing your workflow, you can call ./node_modules/.bin/alfred-link which will only symlink and not override these properties. Because then you will have to undo the automated changes from your info.plist before pushing to git which is annoying.
This PR doesn't affect that behaviour at all. It still works without even touching info.plist
. Nothing gets overridden in info.plist
unless left blank (although maybe some keys should be as mentioned above…)
It's handy to manage everything in one place (personally, I put everything in a project atom.cson
and have it compile to package.json
…)
Also, part of the idea was to try and standardise the bundleid
(but without enforcing anything).
info.plist needs a name because Alfred will crash if not.
Strangely, it also seems to need <description>
(even if just blank) incidentally…