create-plasmic-app 0.0.52 → 0.0.53
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.
- package/dist/lib.js +4 -4
- package/dist/strategies/nextjs.js +1 -1
- package/package.json +1 -1
- package/src/lib.ts +4 -4
- package/src/strategies/nextjs.ts +2 -2
package/dist/lib.js
CHANGED
|
@@ -84,10 +84,10 @@ function create(args) {
|
|
|
84
84
|
useTypescript,
|
|
85
85
|
template,
|
|
86
86
|
});
|
|
87
|
-
// Ensure that we have a empty tsconfig and @types packages
|
|
88
|
-
// Gatsby by default
|
|
89
|
-
// tsconfig so we don't have to ensure it
|
|
90
|
-
if (useTypescript && platform
|
|
87
|
+
// Ensure that we have a empty tsconfig and @types packages.
|
|
88
|
+
// Gatsby and Next.js by default support typescript handling internally
|
|
89
|
+
// tsconfig so we don't have to ensure it.
|
|
90
|
+
if (useTypescript && platform === "react") {
|
|
91
91
|
yield file_utils_1.ensureTsconfig(resolvedProjectPath);
|
|
92
92
|
}
|
|
93
93
|
// Make sure we have an api token for loader
|
|
@@ -23,7 +23,7 @@ const common_1 = require("./common");
|
|
|
23
23
|
const nextjsStrategy = {
|
|
24
24
|
create: (args) => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
25
|
const { projectPath, template, useTypescript } = args;
|
|
26
|
-
const createCommand = `npx create-next-app@latest ${useTypescript ? "--
|
|
26
|
+
const createCommand = `npx create-next-app@latest ${useTypescript ? "--ts" : "--js"} --eslint ${projectPath}`;
|
|
27
27
|
const templateArg = template ? ` --template ${template}` : "";
|
|
28
28
|
// Default Next.js starter already supports Typescript
|
|
29
29
|
// See where we `touch tsconfig.json` later on
|
package/package.json
CHANGED
package/src/lib.ts
CHANGED
|
@@ -77,10 +77,10 @@ export async function create(args: CreatePlasmicAppArgs): Promise<void> {
|
|
|
77
77
|
template,
|
|
78
78
|
});
|
|
79
79
|
|
|
80
|
-
// Ensure that we have a empty tsconfig and @types packages
|
|
81
|
-
// Gatsby by default
|
|
82
|
-
// tsconfig so we don't have to ensure it
|
|
83
|
-
if (useTypescript && platform
|
|
80
|
+
// Ensure that we have a empty tsconfig and @types packages.
|
|
81
|
+
// Gatsby and Next.js by default support typescript handling internally
|
|
82
|
+
// tsconfig so we don't have to ensure it.
|
|
83
|
+
if (useTypescript && platform === "react") {
|
|
84
84
|
await ensureTsconfig(resolvedProjectPath);
|
|
85
85
|
}
|
|
86
86
|
|
package/src/strategies/nextjs.ts
CHANGED
|
@@ -17,8 +17,8 @@ const nextjsStrategy: CPAStrategy = {
|
|
|
17
17
|
create: async (args) => {
|
|
18
18
|
const { projectPath, template, useTypescript } = args;
|
|
19
19
|
const createCommand = `npx create-next-app@latest ${
|
|
20
|
-
useTypescript ? "--
|
|
21
|
-
} ${projectPath}`;
|
|
20
|
+
useTypescript ? "--ts" : "--js"
|
|
21
|
+
} --eslint ${projectPath}`;
|
|
22
22
|
const templateArg = template ? ` --template ${template}` : "";
|
|
23
23
|
|
|
24
24
|
// Default Next.js starter already supports Typescript
|