create-turbo 1.2.16 → 1.3.0-canary.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +18 -9
- package/package.json +1 -1
- package/templates/npm/README.md +3 -3
- package/templates/pnpm/README.md +3 -3
- package/templates/yarn/README.md +3 -3
package/dist/index.js
CHANGED
@@ -39,13 +39,14 @@ var import_fs_extra = __toESM(require("fs-extra"));
|
|
39
39
|
var import_inquirer = __toESM(require("inquirer"));
|
40
40
|
var import_ora = __toESM(require("ora"));
|
41
41
|
var import_meow = __toESM(require("meow"));
|
42
|
+
var import_lt = __toESM(require("semver/functions/lt"));
|
42
43
|
var import_gradient_string = __toESM(require("gradient-string"));
|
43
44
|
var import_update_check = __toESM(require("update-check"));
|
44
45
|
var import_chalk = __toESM(require("chalk"));
|
45
46
|
|
46
47
|
// package.json
|
47
48
|
var name = "create-turbo";
|
48
|
-
var version = "1.
|
49
|
+
var version = "1.3.0-canary.0";
|
49
50
|
var description = "Create a new Turborepo";
|
50
51
|
var homepage = "https://turborepo.org";
|
51
52
|
var license = "MPL-2.0";
|
@@ -218,6 +219,7 @@ var help = `
|
|
218
219
|
Flags:
|
219
220
|
--use-npm Explicitly tell the CLI to bootstrap the app using npm
|
220
221
|
--use-pnpm Explicitly tell the CLI to bootstrap the app using pnpm
|
222
|
+
--use-yarn Explicitly tell the CLI to bootstrap the app using yarn
|
221
223
|
--no-install Explicitly do not run the package manager's install command
|
222
224
|
--help, -h Show this help message
|
223
225
|
--version, -v Show the version of this script
|
@@ -242,6 +244,7 @@ async function run() {
|
|
242
244
|
help: { type: "boolean", default: false, alias: "h" },
|
243
245
|
useNpm: { type: "boolean", default: false },
|
244
246
|
usePnpm: { type: "boolean", default: false },
|
247
|
+
useYarn: { type: "boolean", default: false },
|
245
248
|
install: { type: "boolean", default: true },
|
246
249
|
version: { type: "boolean", default: false, alias: "v" }
|
247
250
|
}
|
@@ -272,6 +275,8 @@ async function run() {
|
|
272
275
|
answers = { packageManager: "npm" };
|
273
276
|
} else if (flags.usePnpm) {
|
274
277
|
answers = { packageManager: "pnpm" };
|
278
|
+
} else if (flags.useYarn) {
|
279
|
+
answers = { packageManager: "yarn" };
|
275
280
|
} else {
|
276
281
|
answers = await import_inquirer.default.prompt([
|
277
282
|
{
|
@@ -315,11 +320,6 @@ async function run() {
|
|
315
320
|
let projectPkg = require(path2.join(projectDir, "package.json"));
|
316
321
|
["dependencies", "devDependencies"].forEach((pkgKey) => {
|
317
322
|
sharedPkg[pkgKey] = __spreadValues(__spreadValues({}, sharedPkg[pkgKey]), projectPkg[pkgKey]);
|
318
|
-
for (let key in sharedPkg[pkgKey]) {
|
319
|
-
if (sharedPkg[pkgKey][key] === "*") {
|
320
|
-
sharedPkg[pkgKey][key] = `latest`;
|
321
|
-
}
|
322
|
-
}
|
323
323
|
});
|
324
324
|
sharedPkg.packageManager = `${answers.packageManager}@${getPackageManagerVersion(answers.packageManager)}`;
|
325
325
|
sharedPkg.name = projectName;
|
@@ -340,8 +340,17 @@ async function run() {
|
|
340
340
|
frames: [" ", "> ", ">> ", ">>>"]
|
341
341
|
}
|
342
342
|
}).start();
|
343
|
-
|
344
|
-
|
343
|
+
let supportsRegistryArg = false;
|
344
|
+
try {
|
345
|
+
supportsRegistryArg = (0, import_lt.default)(getPackageManagerVersion(answers.packageManager), "2.0.0");
|
346
|
+
} catch (err) {
|
347
|
+
}
|
348
|
+
const installArgs = ["install"];
|
349
|
+
if (supportsRegistryArg) {
|
350
|
+
const npmRegistry = await getNpmRegistry(answers.packageManager);
|
351
|
+
installArgs.push(`--registry=${npmRegistry}`);
|
352
|
+
}
|
353
|
+
await (0, import_execa.default)(`${answers.packageManager}`, installArgs, {
|
345
354
|
stdio: "ignore",
|
346
355
|
cwd: projectDir
|
347
356
|
});
|
@@ -374,7 +383,7 @@ async function run() {
|
|
374
383
|
console.log(` Develop all apps and packages`);
|
375
384
|
console.log();
|
376
385
|
console.log(`Turborepo will cache locally by default. For an additional`);
|
377
|
-
console.log(`speed boost, enable Remote Caching
|
386
|
+
console.log(`speed boost, enable Remote Caching with Vercel by`);
|
378
387
|
console.log(`entering the following command:`);
|
379
388
|
console.log();
|
380
389
|
console.log(import_chalk.default.cyan(` ${getNpxCommand(answers.packageManager)} turbo login`));
|
package/package.json
CHANGED
package/templates/npm/README.md
CHANGED
@@ -48,9 +48,9 @@ npm run dev
|
|
48
48
|
|
49
49
|
### Remote Caching
|
50
50
|
|
51
|
-
Turborepo can use a technique known as [Remote Caching
|
51
|
+
Turborepo can use a technique known as [Remote Caching](https://turborepo.org/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
|
52
52
|
|
53
|
-
By default, Turborepo will cache locally. To enable Remote Caching
|
53
|
+
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:
|
54
54
|
|
55
55
|
```
|
56
56
|
cd my-turborepo
|
@@ -71,7 +71,7 @@ Learn more about the power of Turborepo:
|
|
71
71
|
|
72
72
|
- [Pipelines](https://turborepo.org/docs/core-concepts/pipelines)
|
73
73
|
- [Caching](https://turborepo.org/docs/core-concepts/caching)
|
74
|
-
- [Remote Caching
|
74
|
+
- [Remote Caching](https://turborepo.org/docs/core-concepts/remote-caching)
|
75
75
|
- [Scoped Tasks](https://turborepo.org/docs/core-concepts/scopes)
|
76
76
|
- [Configuration Options](https://turborepo.org/docs/reference/configuration)
|
77
77
|
- [CLI Usage](https://turborepo.org/docs/reference/command-line-reference)
|
package/templates/pnpm/README.md
CHANGED
@@ -48,9 +48,9 @@ pnpm run dev
|
|
48
48
|
|
49
49
|
### Remote Caching
|
50
50
|
|
51
|
-
Turborepo can use a technique known as [Remote Caching
|
51
|
+
Turborepo can use a technique known as [Remote Caching](https://turborepo.org/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
|
52
52
|
|
53
|
-
By default, Turborepo will cache locally. To enable Remote Caching
|
53
|
+
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:
|
54
54
|
|
55
55
|
```
|
56
56
|
cd my-turborepo
|
@@ -71,7 +71,7 @@ Learn more about the power of Turborepo:
|
|
71
71
|
|
72
72
|
- [Pipelines](https://turborepo.org/docs/core-concepts/pipelines)
|
73
73
|
- [Caching](https://turborepo.org/docs/core-concepts/caching)
|
74
|
-
- [Remote Caching
|
74
|
+
- [Remote Caching](https://turborepo.org/docs/core-concepts/remote-caching)
|
75
75
|
- [Scoped Tasks](https://turborepo.org/docs/core-concepts/scopes)
|
76
76
|
- [Configuration Options](https://turborepo.org/docs/reference/configuration)
|
77
77
|
- [CLI Usage](https://turborepo.org/docs/reference/command-line-reference)
|
package/templates/yarn/README.md
CHANGED
@@ -48,9 +48,9 @@ yarn run dev
|
|
48
48
|
|
49
49
|
### Remote Caching
|
50
50
|
|
51
|
-
Turborepo can use a technique known as [Remote Caching
|
51
|
+
Turborepo can use a technique known as [Remote Caching](https://turborepo.org/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
|
52
52
|
|
53
|
-
By default, Turborepo will cache locally. To enable Remote Caching
|
53
|
+
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:
|
54
54
|
|
55
55
|
```
|
56
56
|
cd my-turborepo
|
@@ -71,7 +71,7 @@ Learn more about the power of Turborepo:
|
|
71
71
|
|
72
72
|
- [Pipelines](https://turborepo.org/docs/core-concepts/pipelines)
|
73
73
|
- [Caching](https://turborepo.org/docs/core-concepts/caching)
|
74
|
-
- [Remote Caching
|
74
|
+
- [Remote Caching](https://turborepo.org/docs/core-concepts/remote-caching)
|
75
75
|
- [Scoped Tasks](https://turborepo.org/docs/core-concepts/scopes)
|
76
76
|
- [Configuration Options](https://turborepo.org/docs/reference/configuration)
|
77
77
|
- [CLI Usage](https://turborepo.org/docs/reference/command-line-reference)
|