create-turbo 1.0.28 → 1.1.0-canary.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +16 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -21,6 +21,7 @@ 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"));
|
24
25
|
var import_fs_extra = __toModule(require("fs-extra"));
|
25
26
|
var import_inquirer = __toModule(require("inquirer"));
|
26
27
|
var import_ora = __toModule(require("ora"));
|
@@ -31,7 +32,7 @@ var import_chalk = __toModule(require("chalk"));
|
|
31
32
|
|
32
33
|
// package.json
|
33
34
|
var name = "create-turbo";
|
34
|
-
var version = "1.0.
|
35
|
+
var version = "1.1.0-canary.0";
|
35
36
|
var description = "Create a new Turborepo";
|
36
37
|
var homepage = "https://turborepo.org";
|
37
38
|
var license = "MPL-2.0";
|
@@ -305,6 +306,20 @@ async function run() {
|
|
305
306
|
frames: [" ", "> ", ">> ", ">>>"]
|
306
307
|
}
|
307
308
|
}).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));
|
308
323
|
await (0, import_execa.default)(`${answers.packageManager}`, [`install`], {
|
309
324
|
stdio: "ignore",
|
310
325
|
cwd: projectDir
|