You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any interest for adding the possibility to patch the package.json with scripts defined in a seperate file?
It wouldn't be hard to implement and would allow users to use YAML, JS or JSON5 and their pleasantness.
This would also allow the command and the description to be right next to eachother, which i would like
command could look like this:
ntl -p/--patch path/to/file (defaulting to <pkg-root>/.ntlrc.<ext>)
so the structure would be something like:
{"build": {"command": "make build","description": "Builds the project"},"coverage": {"command": "jest --coverage","description": "Run test outputing code coverage"},"test": {"command": "jest"},// or if it has no desc, a shorthand"lint": "standard src/**/*.js"}
this could be used together with general configs #23 like:
{// config properites..."scripts": {// like above...}}
this would also expose a common surface for a module that extends ntl, as config properties can be easily added. we could also add a complementary API that lets you import these scripts (for eg. for usage with npm run-script)
this could also be extended down the line to rather easily implement monorepo support #58 via a 'namespace': {<name>: <path/to/package>} property or something like that.
I'm planning on writing a patcher that does something like this (without the many practicallity featueres of course) for a module i'm writing. so if there is interest in this, i could provide a fundament and help with the further implementation
The text was updated successfully, but these errors were encountered:
That sounds like something that would be interesting to have for sure! 😄 As you pointed out I think the place to start would be to get a proper file config as discussed in #23 so that we could also allow scripts/descriptions/more metadata to live there and be more flexible with regards to user format preference.
I don't even think it would need to be behind a flag such as --patch and would just make it the default behavior for any scripts defined in your .ntlrc file to overwrite the ones defined in package.json
Is there any interest for adding the possibility to patch the package.json with scripts defined in a seperate file?
It wouldn't be hard to implement and would allow users to use YAML, JS or JSON5 and their pleasantness.
This would also allow the command and the description to be right next to eachother, which i would like
command could look like this:
so the structure would be something like:
this could be used together with general configs #23 like:
this would also expose a common surface for a module that extends ntl, as config properties can be easily added. we could also add a complementary API that lets you import these scripts (for eg. for usage with npm run-script)
this could also be extended down the line to rather easily implement monorepo support #58 via a
'namespace': {<name>: <path/to/package>}
property or something like that.I'm planning on writing a patcher that does something like this (without the many practicallity featueres of course) for a module i'm writing. so if there is interest in this, i could provide a fundament and help with the further implementation
The text was updated successfully, but these errors were encountered: