-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add extra features #9
base: master
Are you sure you want to change the base?
Conversation
8e8f0b8
to
0643195
Compare
lib/plist-transform.js
Outdated
const pify = require('pify'); | ||
|
||
const fsP = pify(fs); | ||
const read = require('read-glob-promise'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that read in the contents in the same step? What are the advantages? (aside from it being yours 😉)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's battle tested in production and very fast. It being mine is not really the point here. I would always prefer a module I've used before and trust. No, it doesn't read the file contents, but that requires just a few characters extra characters, and it's kinda weird to mix those concerns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I realised that since npm already copies the contents of the README to readme
in package.json on install, that I could just grab it from there… which makes this much simpler and no need for an extra dependency anyway. I'll definitely check out globby in future though since it's a common need. 👍
be9c8cd
to
09aaf0e
Compare
Translate more values from package.json to info.plist, including support for environment variables.
0b01488
to
19cfbd8
Compare
lib/plist-transform.js
Outdated
data.description = pkg.description || ''; | ||
data.webaddress = pkg.homepage || pkg.author.url || ''; | ||
data.createdby = pkg.author.name || ''; | ||
data.description = data.description || pkg.description || ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely there must be a more elegant way to prevent overriding existing keys than this? CoffeeScript has ?=
for example…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change the current behaviour? This is done on purpose, we always want the description from package.json
to keep them in sync. It wouldn't make sense to set 2 different descriptions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean, so you think description
, createdby
, and webaddress
(version
already is) should be forced from package.json
?
14fe89c
to
d5d7f9d
Compare
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 My other remark on this PR is, do we really need to be able to maintain all these properties in So I have to think about this first before I decide. Feel free to throw in arguments in the discussion :). |
This PR doesn't affect that behaviour at all. It still works without even touching It's handy to manage everything in one place (personally, I put everything in a project Also, part of the idea was to try and standardise the
Strangely, it also seems to need |
Don't override any existing keys in info.plist
Translate more values from package.json to info.plist, including support for environment variables.