From f8fa50ca21997d8fa7f9c61c21e402fb8171d00b Mon Sep 17 00:00:00 2001
From: devloco <40293912+devloco@users.noreply.github.com>
Date: Sat, 23 Nov 2019 21:02:46 -0600
Subject: [PATCH] Issue 31
---
README.md | 24 +++++++++++++-----------
createReactWpTheme.js | 12 +-----------
package.json | 2 +-
3 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/README.md b/README.md
index 0d82d8a..78db76c 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
# Create React WP Theme
-Oct. 12, 2019
+Nov. 23, 2019
-*UPDATED* to match [v3.2.0](https://github.com/facebook/create-react-app/releases/tag/v3.2.0) of [Create React App](https://create-react-app.dev/)
+[v3.2.0](https://github.com/facebook/create-react-app/releases/tag/v3.2.0) of [Create React App](https://create-react-app.dev/) is still the latest.
The intention of this project is to maintain a set of custom `react-scripts` that will allow you to
create React WordPress themes as easily as `create-react-app` allows other devs to create their apps.
@@ -19,6 +19,7 @@ Check it out:
[Let's build a WordPress theme with React: Part 1 (Setup)](http://michaelsoriano.com/wordpress-theme-react-part-1-setup/)
## Readme Contents
+
For more details check out the rest of this document.
- [Creating a New Theme](#creating-a-new-theme)
@@ -58,7 +59,7 @@ To create a WordPress theme using the `create-react-wptheme`, follow these steps
- Write access for your web server is only needed during this setup step.
- **You can revoke write access after the setup has completed.**
- Interested (paranoid?) about what it's doing? Check out the file: `/index.php`
- - When that's done the theme tells you to `Please restart the Nodejs watcher now...`
+ - When that's done you'll see: `Now, back in your command prompt, rerun the "start" script again...`
- To do that, go back to your command prompt where you first ran `npm run start` and rerun that same command again.
- In a few seconds you should see your browser load with the standard create-react-app page, but it's running as a WordPress theme!
@@ -154,16 +155,17 @@ When that command finishes, your optimized files are located in a folder that ca
Here's an example showing which folder to deploy to your server:
-- ...wp-content
- - themes
- - my-theme
- - my-theme `<- deploy this folder to your production server's themes folder`
- - react-src
- - !READY_TO_DEPLOY!.txt
+- ...wp-content
+ - themes
+ - my-theme
+ - my-theme `<- deploy this folder to your production server's themes folder`
+ - react-src
+ - !READY_TO_DEPLOY!.txt
If you need to continue developing your theme, simply:
-- `cd react-src`
-- `npm run start`
+
+- `cd react-src`
+- `npm run start`
And all your theme files will reappear.
diff --git a/createReactWpTheme.js b/createReactWpTheme.js
index 543ebcd..1f7ea02 100644
--- a/createReactWpTheme.js
+++ b/createReactWpTheme.js
@@ -50,7 +50,7 @@ const _wpThemeVersion = packageJson.version;
const _createReactAppVersion = _wpThemeVersion.split("-wp.")[0];
// Check these!!!!
-const _reactScriptsWpThemeVersion = "3.2.0-wp.1";
+const _reactScriptsWpThemeVersion = "3.2.0-wp.2";
const _getScriptsPath = function() {
return scriptsFromNpm();
};
@@ -98,16 +98,6 @@ const scriptsFromGit = function() {
};
};
-const scriptsFromFile = function() {
- let filePath = "file:E:\\WPDev\\github\\devloco\\create-react-wptheme-scripts\\packages\\react-scripts";
- console.log("SCRIPTS FROM FILE", filePath);
- //let filePath = "file:/mnt/e/WPDev/github/devloco/create-react-wptheme-scripts/packages/react-scripts";
- return {
- path: filePath,
- callback: function() {}
- };
-};
-
let projectName;
const program = new commander.Command(packageJson.name)
.version(packageJson.version)
diff --git a/package.json b/package.json
index 753d4c1..9fa6a37 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@devloco/create-react-wptheme",
- "version": "3.2.0-wp.2",
+ "version": "3.2.0-wp.3",
"description": "Create React WP themes with no build configuration.",
"main": "index.js",
"scripts": {