Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit057a65d

Browse files
committed
Issue 45
1 parenta8d508b commit057a65d

File tree

4 files changed

+16
-83
lines changed

4 files changed

+16
-83
lines changed

‎packages/create-react-wptheme-utils/getPublicUrlOrPath.js‎

Lines changed: 0 additions & 64 deletions
This file was deleted.

‎packages/create-react-wptheme-utils/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"@devloco/create-react-wptheme-utils",
3-
"version":"3.4.0-wp.1",
3+
"version":"3.4.0-wp.2",
44
"description":"Utilities used by create-react-wptheme.",
55
"engines": {
66
"node":">=8"
@@ -20,7 +20,6 @@
2020
"files": [
2121
"fileFunctions.js",
2222
"fileWatcherPlugin.js",
23-
"getPublicUrlOrPath.js",
2423
"getUserConfig.js",
2524
"postInstallerInfo.js",
2625
"shell-js.js",

‎packages/create-react-wptheme/createReactWpTheme.js‎

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,23 @@ const _wpThemeVersion = packageJson.version;
4343
const_createReactAppVersion=_wpThemeVersion.split("-wp.")[0];
4444

4545
// Check these!!!!
46-
const_reactScriptsWpThemeVersion="^3.4.0-wp.1";
47-
const_getScriptsPath=function(){
46+
const_reactScriptsWpThemeVersion="^3.4.0-wp.2";
47+
const_getScriptsPath=function(){
4848
returnscriptsFromNpm();
4949
};
5050

51-
constscriptsFromNpm=function(){
51+
constscriptsFromNpm=function(){
5252
//console.log("SCRIPTS FROM NPM");
5353
return{
54-
path:`@devloco/react-scripts-wptheme@${_reactScriptsWpThemeVersion}`
54+
path:`@devloco/react-scripts-wptheme@${_reactScriptsWpThemeVersion}`,
5555
};
5656
};
5757

58-
constscriptsFromGit=function(){
58+
constscriptsFromGit=function(){
5959
console.log("SCRIPTS FROM GIT");
6060
constdeleteFolderRecursive=(path)=>{
6161
if(fs.existsSync(path)){
62-
fs.readdirSync(path).forEach(function(file){
62+
fs.readdirSync(path).forEach(function(file){
6363
letcurPath=path+"/"+file;
6464
if(fs.statSync(curPath).isDirectory()){
6565
// recurse
@@ -84,9 +84,9 @@ const scriptsFromGit = function() {
8484
letscriptsPath="file:"+path.join(tempPath,"create-react-app","packages","react-scripts");
8585
return{
8686
path:scriptsPath,
87-
callback:function(){
87+
callback:function(){
8888
deleteFolderRecursive(tempPath);
89-
}
89+
},
9090
};
9191
};
9292

@@ -122,11 +122,11 @@ if (program.info) {
122122
Binaries:["Node","npm","Yarn"],
123123
Browsers:["Chrome","Edge","Internet Explorer","Firefox","Safari"],
124124
npmPackages:["react","react-dom","react-scripts"],
125-
npmGlobalPackages:["create-react-app"]
125+
npmGlobalPackages:["create-react-app"],
126126
},
127127
{
128128
duplicates:true,
129-
showNotFound:true
129+
showNotFound:true,
130130
}
131131
)
132132
.then(console.log);
@@ -199,7 +199,7 @@ function createWpTheme(root, appName, version, verbose, originalDirectory, templ
199199
.then((packageName)=>
200200
checkIfOnline(useYarn).then((isOnline)=>({
201201
isOnline:isOnline,
202-
packageName:packageName
202+
packageName:packageName,
203203
}))
204204
)
205205
.then((info)=>{
@@ -241,14 +241,14 @@ function createReactApp(createWpThemeReactRoot, appName, version, verbose, origi
241241
args.push(scriptsPath.path);
242242

243243
constchild=spawn(command,args,{stdio:"inherit"})
244-
.on("error",function(err){
244+
.on("error",function(err){
245245
console.log(`createReactWpTheme.js ERROR for command:${command}${args.join(" ")}`);
246246
throwerr;
247247
})
248248
.on("close",(code)=>{
249249
if(code!==0){
250250
reject({
251-
command:`${command}${args.join(" ")}`
251+
command:`${command}${args.join(" ")}`,
252252
});
253253

254254
return;
@@ -288,9 +288,7 @@ function getProxy() {
288288
}else{
289289
try{
290290
// Trying to read https-proxy from .npmrc
291-
lethttpsProxy=execSync("npm config get https-proxy")
292-
.toString()
293-
.trim();
291+
lethttpsProxy=execSync("npm config get https-proxy").toString().trim();
294292
returnhttpsProxy!=="null" ?httpsProxy :undefined;
295293
}catch(e){
296294
return;

‎packages/create-react-wptheme/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"create-react-wptheme",
3-
"version":"3.4.0-wp.3",
3+
"version":"3.4.0-wp.4",
44
"description":"Create React-enabled WP themes.",
55
"main":"index.js",
66
"scripts": {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp