create-turbo 1.1.0-canary.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +17 -16
- package/package.json +1 -1
- package/templates/_shared_ts/README.md +0 -1
- package/templates/_shared_ts/apps/docs/package.json +2 -1
- package/templates/_shared_ts/apps/web/package.json +2 -1
- package/templates/_shared_ts/packages/config/package.json +1 -1
- package/templates/npm/README.md +0 -1
- package/templates/pnpm/README.md +0 -1
- package/templates/pnpm/apps/docs/package.json +2 -1
- package/templates/pnpm/apps/web/package.json +2 -1
- package/templates/yarn/README.md +0 -1
package/dist/index.js
CHANGED
@@ -21,7 +21,6 @@ var __toModule = (module2) => {
|
|
21
21
|
// src/index.ts
|
22
22
|
var path2 = __toModule(require("path"));
|
23
23
|
var import_execa = __toModule(require("execa"));
|
24
|
-
var import_fs = __toModule(require("fs"));
|
25
24
|
var import_fs_extra = __toModule(require("fs-extra"));
|
26
25
|
var import_inquirer = __toModule(require("inquirer"));
|
27
26
|
var import_ora = __toModule(require("ora"));
|
@@ -32,7 +31,7 @@ var import_chalk = __toModule(require("chalk"));
|
|
32
31
|
|
33
32
|
// package.json
|
34
33
|
var name = "create-turbo";
|
35
|
-
var version = "1.1.0
|
34
|
+
var version = "1.1.0";
|
36
35
|
var description = "Create a new Turborepo";
|
37
36
|
var homepage = "https://turborepo.org";
|
38
37
|
var license = "MPL-2.0";
|
@@ -178,6 +177,21 @@ function tryGitInit(root) {
|
|
178
177
|
}
|
179
178
|
}
|
180
179
|
|
180
|
+
// src/getPackageManagerVersion.ts
|
181
|
+
var import_child_process4 = __toModule(require("child_process"));
|
182
|
+
var getPackageManagerVersion = (ws) => {
|
183
|
+
switch (ws) {
|
184
|
+
case "yarn":
|
185
|
+
return (0, import_child_process4.execSync)("yarn --version").toString().trim();
|
186
|
+
case "pnpm":
|
187
|
+
return (0, import_child_process4.execSync)("pnpm --version").toString().trim();
|
188
|
+
case "npm":
|
189
|
+
return (0, import_child_process4.execSync)("npm --version").toString().trim();
|
190
|
+
default:
|
191
|
+
throw new Error(`${ws} is not supported`);
|
192
|
+
}
|
193
|
+
};
|
194
|
+
|
181
195
|
// src/index.ts
|
182
196
|
var turboGradient = (0, import_gradient_string.default)("#0099F7", "#F11712");
|
183
197
|
var help = `
|
@@ -289,6 +303,7 @@ async function run() {
|
|
289
303
|
}
|
290
304
|
}
|
291
305
|
});
|
306
|
+
appPkg.packageManager = `${answers.packageManager}@${getPackageManagerVersion(answers.packageManager)}`;
|
292
307
|
await import_fs_extra.default.writeFile(path2.join(projectDir, "package.json"), JSON.stringify(appPkg, null, 2));
|
293
308
|
if (flags.install) {
|
294
309
|
console.log();
|
@@ -306,20 +321,6 @@ async function run() {
|
|
306
321
|
frames: [" ", "> ", ">> ", ">>>"]
|
307
322
|
}
|
308
323
|
}).start();
|
309
|
-
const data = import_fs.default.readFileSync(`${projectDir}/package.json`, "utf8");
|
310
|
-
const pkg = JSON.parse(data.toString());
|
311
|
-
switch (answers.packageManager) {
|
312
|
-
case "yarn":
|
313
|
-
pkg.packageManager = "yarn@1.22.17";
|
314
|
-
break;
|
315
|
-
case "pnpm":
|
316
|
-
pkg.packageManager = "pnpm@6.26.1";
|
317
|
-
break;
|
318
|
-
case "npm":
|
319
|
-
pkg.packageManager = "npm@8.3.0";
|
320
|
-
break;
|
321
|
-
}
|
322
|
-
import_fs.default.writeFileSync(`${projectDir}/package.json`, JSON.stringify(pkg, null, 2));
|
323
324
|
await (0, import_execa.default)(`${answers.packageManager}`, [`install`], {
|
324
325
|
stdio: "ignore",
|
325
326
|
cwd: projectDir
|
package/package.json
CHANGED
@@ -22,5 +22,4 @@ This turborepo has some additional tools already setup for you:
|
|
22
22
|
|
23
23
|
- [TypeScript](https://www.typescriptlang.org/) for static type checking
|
24
24
|
- [ESLint](https://eslint.org/) for code linting
|
25
|
-
- [Jest](https://jestjs.io) test runner for all things JavaScript
|
26
25
|
- [Prettier](https://prettier.io) for code formatting
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"lint": "next lint"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
|
-
"next": "12.0.
|
12
|
+
"next": "12.0.8",
|
13
13
|
"react": "17.0.2",
|
14
14
|
"react-dom": "17.0.2",
|
15
15
|
"ui": "*"
|
@@ -19,6 +19,7 @@
|
|
19
19
|
"eslint": "7.32.0",
|
20
20
|
"next-transpile-modules": "9.0.0",
|
21
21
|
"tsconfig": "*",
|
22
|
+
"@types/node": "^17.0.12",
|
22
23
|
"@types/react": "17.0.37",
|
23
24
|
"typescript": "^4.5.3"
|
24
25
|
}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"lint": "next lint"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
|
-
"next": "12.0.
|
12
|
+
"next": "12.0.8",
|
13
13
|
"react": "17.0.2",
|
14
14
|
"react-dom": "17.0.2",
|
15
15
|
"ui": "*"
|
@@ -19,6 +19,7 @@
|
|
19
19
|
"eslint": "7.32.0",
|
20
20
|
"next-transpile-modules": "9.0.0",
|
21
21
|
"tsconfig": "*",
|
22
|
+
"@types/node": "^17.0.12",
|
22
23
|
"@types/react": "17.0.37",
|
23
24
|
"typescript": "^4.5.3"
|
24
25
|
}
|
package/templates/npm/README.md
CHANGED
@@ -22,7 +22,6 @@ This turborepo has some additional tools already setup for you:
|
|
22
22
|
|
23
23
|
- [TypeScript](https://www.typescriptlang.org/) for static type checking
|
24
24
|
- [ESLint](https://eslint.org/) for code linting
|
25
|
-
- [Jest](https://jestjs.io) test runner for all things JavaScript
|
26
25
|
- [Prettier](https://prettier.io) for code formatting
|
27
26
|
|
28
27
|
## Setup
|
package/templates/pnpm/README.md
CHANGED
@@ -22,7 +22,6 @@ This turborepo has some additional tools already setup for you:
|
|
22
22
|
|
23
23
|
- [TypeScript](https://www.typescriptlang.org/) for static type checking
|
24
24
|
- [ESLint](https://eslint.org/) for code linting
|
25
|
-
- [Jest](https://jestjs.io) test runner for all things JavaScript
|
26
25
|
- [Prettier](https://prettier.io) for code formatting
|
27
26
|
|
28
27
|
## Setup
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"lint": "next lint"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
|
-
"next": "12.0.
|
12
|
+
"next": "12.0.8",
|
13
13
|
"react": "17.0.2",
|
14
14
|
"react-dom": "17.0.2",
|
15
15
|
"ui": "workspace:*"
|
@@ -19,6 +19,7 @@
|
|
19
19
|
"eslint": "7.32.0",
|
20
20
|
"next-transpile-modules": "9.0.0",
|
21
21
|
"tsconfig": "workspace:*",
|
22
|
+
"@types/node": "^17.0.12",
|
22
23
|
"@types/react": "17.0.37",
|
23
24
|
"typescript": "^4.5.3"
|
24
25
|
}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"lint": "next lint"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
|
-
"next": "12.0.
|
12
|
+
"next": "12.0.8",
|
13
13
|
"react": "17.0.2",
|
14
14
|
"react-dom": "17.0.2",
|
15
15
|
"ui": "workspace:*"
|
@@ -19,6 +19,7 @@
|
|
19
19
|
"eslint": "7.32.0",
|
20
20
|
"next-transpile-modules": "9.0.0",
|
21
21
|
"tsconfig": "workspace:*",
|
22
|
+
"@types/node": "^17.0.12",
|
22
23
|
"@types/react": "17.0.37",
|
23
24
|
"typescript": "^4.5.3"
|
24
25
|
}
|
package/templates/yarn/README.md
CHANGED
@@ -22,7 +22,6 @@ This turborepo has some additional tools already setup for you:
|
|
22
22
|
|
23
23
|
- [TypeScript](https://www.typescriptlang.org/) for static type checking
|
24
24
|
- [ESLint](https://eslint.org/) for code linting
|
25
|
-
- [Jest](https://jestjs.io) test runner for all things JavaScript
|
26
25
|
- [Prettier](https://prettier.io) for code formatting
|
27
26
|
|
28
27
|
## Setup
|