Applying a patch

Hello. Sorry if this is a totally obvious question but I’m quite new to the whole npm/browserify and don’t come from a node background.

After doing the npm updates and getting all the modules in node_modules, how do I apply a patch ? or better how do I update everything to the git head so I can browserify again with the latest code ?

Do I need to change something in my package.json ?

NPM doesn’t help you with applying patches, you’d have to pull from git instead. It does make it easy, as soon as I release a bugfix version, to get that version by reinstalling the package (if you specified a sensible version range, for example the default you get when you do npm install --save.)

the issue with a git pull is that you get the src file which is different from the dist, so you may have to merge patches manually which sucks

to always get the head, what you can do and should work is for example for the prosemirror-model do:

npm install https://github.com/ProseMirror/prosemirror-model

then edit: node_modules\prosemirror-model\package.json

and change

“main”: “dist/index.js”,

into

“main”: “src/index.js”,

I think that should work but you have to see how it goes …

Also this will use the ES6 sources directly so will only work in latest chrome etc and not to be use for deployment