refactor: create a dedicated method for updating package.json#527
refactor: create a dedicated method for updating package.json#527
package.json#527Conversation
08958b0 to
008e79d
Compare
joshmcarthur
left a comment
There was a problem hiding this comment.
I'm fine with this in principle, but we use template files a lot for similar use cases. I just wanted to prompt whether a template would be cleaner than doing a lot of file substitutions from code like this
|
We can't use templating because the file is touched by external code too i.e. Also I don't think it's as comparable: afaik all our templating files are generally within a single variant or maybe two whereas this particular file is modified by 5, and which are somewhat dependent on the actions of each other so I don't think templating would be as clean of a solution here. |
|
Cool, that's all good. I thought it was worth raising, because it's quite easy to take an established pattern (like modifying the file in code), and use that over something that's already available via thor and the generator framework |
008e79d to
dd79577
Compare
I'm aware of how much conflict this will create with #466 but oh well 🤷