sapegin/mrm-core

Accepting filePath in `packageJson`

Open

#28 opened on May 29, 2019

View on GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (14 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (33 stars)
PR merge metrics
 (PR metrics pending)

Description

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?

Contributor guide