Create sub-path programmatically on package configuration #4416
-
Is there any conventional way to create a new package.json/tsconfig.json sub-path using package configuration or npm script for version 6? The idea is that some package installed by NPM enables new functionality and a new namespace for importing (like "#something/..."). So it becomes available without forcing a user to create it manually. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
we don't have any high-level API for that. by high-level API i mean like the one we have with Codemods API that said, you can do it on your own. in your |
Beta Was this translation helpful? Give feedback.
we don't have any high-level API for that. by high-level API i mean like the one we have with Codemods API
that said, you can do it on your own. in your
configure.ts
file you can open and modify files using standardnode:fs
, just as you would with a normal Node script.readFile
andwriteFile
and you should be able to do what you want