Skip to content

Commit d998b96

Browse files
committed
Updated to match create-react-app 3.2.0
1 parent ec41f6f commit d998b96

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Create React WP Theme <!-- omit in toc -->
22

3-
*UPDATED* to support [Create React App](https://github.com/facebook/create-react-app) v3.1.2
3+
Oct. 12, 2019
4+
<br />
5+
*UPDATED* to match [v3.2.0](https://github.com/facebook/create-react-app/releases/tag/v3.2.0) of [Create React App](https://reactjs.org/)
46

57
The intention of this project is to maintain a set of custom `react-scripts` that will allow you to
68
create React WordPress themes as easily as `create-react-app` allows other devs to create their apps.

createReactWpTheme.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2018-present, https://github.com/devloco
2+
* Copyright (c) 2019-present, https://github.com/devloco
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
@@ -47,17 +47,18 @@ const envinfo = require("envinfo");
4747

4848
const packageJson = require("./package.json");
4949
const _wpThemeVersion = packageJson.version;
50-
// const _createReactAppVersion = _wpThemeVersion.split('-')[0];
50+
const _createReactAppVersion = _wpThemeVersion.split("-wp.")[0];
5151

52-
// Check this!!!!
52+
// Check these!!!!
53+
const _reactScriptsWpThemeVersion = "3.2.0-wp.1";
5354
const _getScriptsPath = function() {
5455
return scriptsFromNpm();
5556
};
5657

5758
const scriptsFromNpm = function() {
5859
//console.log("SCRIPTS FROM NPM");
5960
return {
60-
path: "@devloco/react-scripts-wptheme",
61+
path: `@devloco/react-scripts-wptheme@^${_reactScriptsWpThemeVersion}`,
6162
callback: function() {}
6263
};
6364
};
@@ -169,6 +170,8 @@ function printValidationResults(results) {
169170
}
170171

171172
console.log(program.name() + " version: " + chalk.magenta(_wpThemeVersion));
173+
console.log("@devloco/react-scripts-wptheme version: " + chalk.magenta(_reactScriptsWpThemeVersion));
174+
console.log("create-react-app version: " + chalk.magenta(_createReactAppVersion));
172175
createApp(projectName, program.verbose, program.scriptsVersion, program.useNpm, program.usePnp, program.typescript);
173176

174177
function createApp(name, verbose, version, useNpm, usePnp, useTypescript, template) {
@@ -239,7 +242,7 @@ function createReactApp(createWpThemeReactRoot, appName, version, verbose, origi
239242
let command = "npx";
240243

241244
let args = [];
242-
args.push("create-react-app");
245+
args.push(`create-react-app@${_createReactAppVersion}`);
243246
args.push(createWpThemeReactRoot);
244247

245248
if (verbose) {

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "create-react-wptheme",
3-
"version": "3.1.201",
2+
"name": "@devloco/create-react-wptheme",
3+
"version": "3.2.0-wp.1",
44
"description": "Create React WP themes with no build configuration.",
55
"main": "index.js",
66
"scripts": {
@@ -43,11 +43,11 @@
4343
},
4444
"dependencies": {
4545
"chalk": "2.4.2",
46-
"commander": "2.19.0",
46+
"commander": "2.20.0",
4747
"cross-spawn": "6.0.5",
4848
"envinfo": "7.3.1",
4949
"fs-extra": "7.0.1",
50-
"semver": "6.0.0",
50+
"semver": "6.3.0",
5151
"tmp": "0.0.33",
5252
"validate-npm-package-name": "3.0.0"
5353
}

0 commit comments

Comments
 (0)