Reputation: 108
I have a web app in which I installed an npm package. Now I noted that I need to add code to customize it. I tried to go to node_modules, found the package, and edited it but the changes don't show. is there a way to do it? Also to avoid losing the changes I make to the packages I forked the package from GitHub.
----Update
I have aa package called react-image-crop the relative path is node_modules/react-image-crop
.
Every time the below function gets called I want to log X and Y of the position:
let pageX;
let pageY;
if (e.touches) {
pageX = e.touches[0].pageX;
pageY = e.touches[0].pageY;
} else {
pageX = e.pageX;
pageY = e.pageY;
}
return {
x: pageX,
y: pageY,
};
}
I tried to add console.log(pageX, pageY)
but I don't get the respected output.
the package I'm working on is https://github.com/DominicTobias/react-image-crop (hope I can have links to packages in my question otherwise I can delete it)
Upvotes: 0
Views: 62
Reputation: 8220
If you need to modify npm package check this checklist:
Upvotes: 1