Closed this-is-rafa closed 5 years ago
Apologies for the delay. And thank you for letting me know this project has been useful for you. You're officially the first person to tell me that you use it and like it.
As for updating, I'll have to look at what NPM steps to take and document them in the README. I'll get that done this week.
In the meantime, a quick-n-dirty process would be:
<your old theme>/react-src/node_modules/@devloco
npm install
in your old theme's react-src
folder.I'll leave this ticket open to remind me to document an official update process.
Thanks again!
-joe
@this-is-rafa, I was just surfing your jolt-theme
repo and looked at the package.json there. I bet if you change version of:
"@devloco/react-scripts-wptheme": "2.1.1-wptheme-2.0.8",
to be:
"@devloco/react-scripts-wptheme": "2.1.1-wptheme-2.1.1",
Note "2.0.8" to "2.1.1" and then run npm install
in there, you'll get updated in a proper fashion.
I've added NPM updating instructions to the README. I got the ideas from Facebook's updating instructions. The new section added to the README is:
When new versions of Create React WP Theme
are released, you can upgrade using a single command.
From within your theme's react-src
folder, run this command at a command prompt:
npm install @devloco/react-scripts-wptheme@latest
If your theme uses TypeScript, you'll need to run a second command (create-react-wptheme
uses the Types from Facebook's React-Scripts):
npm install react-scripts@latest
Wow, thanks for much for the thorough investigation and solution. I've not tried it yet but it looks like it should work no problem.
You're officially the first person to tell me that you use it and like it.
It works like it says on the tin and it's a great way to get into React and the Wordpress API at the same time. Thanks again!
Hi, thanks for this project. It's been really handy.
I started a project when the build bug was still a thing. I'm wondering if you could tell me how to update.
npm update
doesn't work.Thanks.