mrm-core icon indicating copy to clipboard operation
mrm-core copied to clipboard

Accepting filePath in `packageJson`

Open thetutlage opened this issue 6 years ago • 1 comments

All file related API's accepts the argument to the define file name/path.

json('foo.json')

If the path is absolute, then it simply writes to that absolute path, which silently opens up the possibility to write contents to different directory by passing absolute paths.

json(join(someBasePath, 'foo.json'))

However, this is not possible with the packageJson file. Do you think, we can accept the 2nd argument as the filePath?

thetutlage avatar May 29 '19 08:05 thetutlage

Yeah, sounds like a good feature, feel free to send a pull request ;-)

sapegin avatar May 31 '19 11:05 sapegin