Skip to content

Commit ba06f86

Browse files
committed
cra 3.1.1 update
1 parent 374e122 commit ba06f86

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

README.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Create React WP Theme <!-- omit in toc -->
22

3-
`*UPDATED* to support create-react-app v3.0.1`
3+
`*UPDATED* to support create-react-app v3.1.1`
44

55
The intention of this project is to maintain a set of custom `react-scripts` that will allow you to
66
create React WordPress themes as easily as `create-react-app` allows other devs to create their apps.
@@ -19,7 +19,7 @@ Check it out:
1919
## Readme Contents <!-- omit in toc -->
2020
For more details check out the rest of this document.
2121

22-
- [Usage](#usage)
22+
- [Creating a New Theme](#creating-a-new-theme)
2323
- [Updating Existing Themes](#updating-existing-themes)
2424
- [Developing Your Theme](#developing-your-theme)
2525
- [React Tutorials](#react-tutorials)
@@ -32,7 +32,7 @@ For more details check out the rest of this document.
3232
- [Acknowledgements](#acknowledgements)
3333
- [License](#license)
3434

35-
## Usage
35+
## Creating a New Theme
3636

3737
To create a WordPress theme using the `create-react-wptheme`, follow these steps.
3838

@@ -159,6 +159,11 @@ Here's an example showing which folder to deploy to your server:
159159
- react-src
160160
- !READY_TO_DEPLOY!.txt
161161

162+
If you need to continue developing your theme, simply:
163+
- `cd react-src`
164+
- `npm run start`
165+
166+
And all your theme files will reappear.
162167

163168
### Dealing With Differing Paths Between DEV and PROD
164169

@@ -171,7 +176,7 @@ For example:
171176

172177
- Your WordPress dev server is running at http<nolink>://localhost/wordpress
173178
- the homepage setting in your main package.json file will probably work just fine.
174-
- The homepage line in your main package.json be something like: `"homepage": "/wordpress/wp-content/themes/<your theme's folder name>"`
179+
- The homepage line in your main package.json will be something like: `"homepage": "/wordpress/wp-content/themes/<your theme's folder name>"`
175180
- But you know that your production server runs WordPress from the root: http<nolink>://mycoolblog.com/
176181
- In this case you want to remove the `/wordpress` part, so set the "homepage" line in your `user.prod.json` file to:
177182
`"homepage": "/wp-content/themes/<your theme's folder name>"`

createReactWpTheme.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ const _getScriptsPath = function() {
5555
};
5656

5757
const scriptsFromNpm = function() {
58-
//path: "@devloco/react-scripts-test",
59-
//path: "@devloco/react-scripts-wptheme",
60-
//console.log('SCRIPTS FROM NPM');
58+
//console.log("SCRIPTS FROM NPM");
6159
return {
6260
path: "@devloco/react-scripts-wptheme",
6361
callback: function() {}
@@ -297,7 +295,7 @@ function checkAppName(appName) {
297295
}
298296

299297
// TODO: there should be a single place that holds the dependencies
300-
const dependencies = ["react", "react-dom", "react-scripts", "@devloco/react-scripts-wptheme", "react-scripts-wptheme"].sort();
298+
const dependencies = ["react", "react-dom", "react-scripts", "@devloco/react-scripts-wptheme"].sort();
301299
if (dependencies.indexOf(appName) >= 0) {
302300
console.error(
303301
chalk.red(`We cannot create a project called ${chalk.green(appName)} because a dependency with the same name exists.\n` + `Due to the way npm works, the following names are not allowed:\n\n`) +

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devloco/create-react-wptheme",
3-
"version": "3.0.1-wptheme-3.0.4",
3+
"version": "3.1.1-wptheme-3.1.1",
44
"description": "Create React WP themes with no build configuration.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)