Feedback: Two days later, I'm totally in love with VSCode. It's really awesome and it made my life a lot easier! Thanks guys!
Best practices for modifying tpl files then updating?
I may just be mentally challenged but I've not been able to successfully upgrade nodebb once. Every time I've had to back the directory up, redownload from git, reinstall everything and then modify all the tpl files I made changes in and then copy over the plugins.
Even the little minor commits you guys do, typically I'll do:
Though I think it's worth mentioning that after I noticed this never worked for me, I even tried updating it without stashing. Just a straight up git pull, npm install, npm update and nodebb still wouldn't start for me.
Every time I do the above, my install breaks and I have to re-download everything and start from scratch even though I modify like the header.tpl, footer.tpl and before there was the option for the social links I was editing those out.
If I'm missing something obvious here if someone could point me in the right direction that'd be great.
cani last edited by cani
I've modified both tpl's and core files and my process is different (probably due to not knowing proper way). Not that any of this might be of help to you, but maybe others and myself due to replies.
- Download the latest git build via website (Download Zip).
- Use WinMergeU to merge changes.
- Shutdown nodebb
- Upload the new files to nodebb directory.
- run npm update
- try running, get error about bcrypt, delete bcrypt directory
- run npm update again
I mainly develop on windows, using sublime text 2 and WinMergeU to merge. There might be a much easier way, if anyone can point it out to me much love.
Yeah I get the same error message as your number 6, except when I delete bcrypt and update it's just something else - rinse and repeat till I literally just delete node-modules and npm install.. lol
Most of my development is done on Mac, but git stash/pop should merge properly and if it doesn't you can go into the file and see where the conflicts are.
Is there currently no way to tell a theme to use custom tpl files? That would probably solve this issue.
I was wondering this myself before I dive into editing the templates.
Technically, there is no need to run
npm updatefor packages other than
nodebb-*packages. So all you really need to do is
However, you'd want to update the nodebb plugins/themes, so:
cd /path/to/your/nodebb/install git pull npm install cd node_modules ls nodebb-* | xargs npm update // I do not take responsibility for this command, if it burns your house down... cd ../ ./nodebb start
If you run into errors specified by #6, please do an
npm rebuildto patch that right up.