Issue
I made some custom modifications in the ngx-mask package and need to test it locally.
How to overwrite the installed npm package?
Currently the package is declared as a dependency in packages.json file as:
"ngx-mask": "^7.8.9"
I do prefer not to fork the original package and not to use github for this, if possible.
Solution
If you have made these changes on your machine. (I'm assuming you have)
Run a
buildof thengx-maskpackage that you changed.navigate to the
dist/ whatever your compiled output folder is.run
npm packfrom the parent folder. This creates a.tgzzip file of your package with your custom modifications.copy that file into the root (you could put it wherever but root makes things easy) of your project.
in your
package.jsonreplace the version number ngx mask to the following"ngx-mask": "file:my-packed-file.tgz"Run an
npm installusing your newpackage.json
you should have your modified copy loaded in as a dependency in node_modules.
Answered By - James
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.