create-plasmic-app 0.0.56 → 0.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28,7 +28,7 @@ function runCodegenSync(opts) {
|
|
|
28
28
|
const project = projectApiToken
|
|
29
29
|
? `${projectId}:${projectApiToken}`
|
|
30
30
|
: projectId;
|
|
31
|
-
yield (0, cmd_utils_1.spawnOrFail)(`npx
|
|
31
|
+
yield (0, cmd_utils_1.spawnOrFail)(`npx plasmic sync --yes -p ${project}`, projectPath);
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
exports.runCodegenSync = runCodegenSync;
|
package/dist/strategies/react.js
CHANGED
|
@@ -22,7 +22,7 @@ const reactStrategy = {
|
|
|
22
22
|
create: (args) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
23
|
const { projectPath, useTypescript } = args;
|
|
24
24
|
let { template } = args;
|
|
25
|
-
const createCommand = `npx
|
|
25
|
+
const createCommand = `npx create-react-app@latest ${projectPath}`;
|
|
26
26
|
if (!template && useTypescript) {
|
|
27
27
|
template = "typescript";
|
|
28
28
|
}
|
|
@@ -56,7 +56,7 @@ const reactStrategy = {
|
|
|
56
56
|
yield (0, file_utils_1.overwriteIndex)(projectPath, "react", scheme);
|
|
57
57
|
}
|
|
58
58
|
// Deactivate React.StrictMode from index.tsx
|
|
59
|
-
const indexFileName = path_1.default.join(projectPath, "src", `index.${useTypescript ? "tsx" : "
|
|
59
|
+
const indexFileName = path_1.default.join(projectPath, "src", `index.${useTypescript ? "tsx" : "js"}`);
|
|
60
60
|
let indexFile = fs_1.default.readFileSync(indexFileName).toString();
|
|
61
61
|
indexFile = indexFile.replace("<React.StrictMode>", "");
|
|
62
62
|
indexFile = indexFile.replace("</React.StrictMode>", "");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-plasmic-app",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.58",
|
|
4
4
|
"description": "Create Plasmic-powered React apps",
|
|
5
5
|
"main": "./dist/lib.js",
|
|
6
6
|
"types": "./dist/lib.d.ts",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"validate-npm-package-name": "^3.0.0",
|
|
55
55
|
"yargs": "^16.2.0"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "74968cbda0afe89e38c9aef1701fede10c6fb106"
|
|
58
58
|
}
|
package/src/strategies/common.ts
CHANGED
|
@@ -23,8 +23,5 @@ export async function runCodegenSync(opts: {
|
|
|
23
23
|
? `${projectId}:${projectApiToken}`
|
|
24
24
|
: projectId;
|
|
25
25
|
|
|
26
|
-
await spawnOrFail(
|
|
27
|
-
`npx -p @plasmicapp/cli plasmic sync --yes -p ${project}`,
|
|
28
|
-
projectPath
|
|
29
|
-
);
|
|
26
|
+
await spawnOrFail(`npx plasmic sync --yes -p ${project}`, projectPath);
|
|
30
27
|
}
|
package/src/strategies/react.ts
CHANGED
|
@@ -10,7 +10,7 @@ const reactStrategy: CPAStrategy = {
|
|
|
10
10
|
create: async (args) => {
|
|
11
11
|
const { projectPath, useTypescript } = args;
|
|
12
12
|
let { template } = args;
|
|
13
|
-
const createCommand = `npx
|
|
13
|
+
const createCommand = `npx create-react-app@latest ${projectPath}`;
|
|
14
14
|
|
|
15
15
|
if (!template && useTypescript) {
|
|
16
16
|
template = "typescript";
|
|
@@ -55,7 +55,7 @@ const reactStrategy: CPAStrategy = {
|
|
|
55
55
|
const indexFileName = path.join(
|
|
56
56
|
projectPath,
|
|
57
57
|
"src",
|
|
58
|
-
`index.${useTypescript ? "tsx" : "
|
|
58
|
+
`index.${useTypescript ? "tsx" : "js"}`
|
|
59
59
|
);
|
|
60
60
|
let indexFile = fs.readFileSync(indexFileName).toString();
|
|
61
61
|
indexFile = indexFile.replace("<React.StrictMode>", "");
|