create-turbo 1.0.6 → 1.0.10
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/index.js +35 -25
- package/package.json +2 -2
- package/templates/_shared_ts/README.md +2 -2
- package/templates/_shared_ts/gitignore +1 -0
- package/templates/_shared_ts/package.json +6 -2
- package/templates/npm/README.md +2 -2
- package/templates/npm/package.json +2 -2
- package/templates/pnpm/README.md +2 -2
- package/templates/pnpm/package.json +2 -2
- package/templates/yarn/README.md +4 -4
- package/templates/yarn/package.json +2 -2
- package/templates/_shared_ts/apps/docs/.turbo/turbo-build.log +0 -21
- package/templates/_shared_ts/apps/docs/.turbo/turbo-lint.log +0 -5
- package/templates/_shared_ts/apps/web/.turbo/turbo-build.log +0 -21
- package/templates/_shared_ts/apps/web/.turbo/turbo-dev.log +0 -6
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var import_chalk = __toModule(require("chalk"));
|
|
|
31
31
|
|
|
32
32
|
// package.json
|
|
33
33
|
var name = "create-turbo";
|
|
34
|
-
var version = "1.0.
|
|
34
|
+
var version = "1.0.10";
|
|
35
35
|
var description = "Create a new Turborepo";
|
|
36
36
|
var homepage = "https://turborepo.org";
|
|
37
37
|
var license = "MPL-2.0";
|
|
@@ -75,7 +75,7 @@ var devDependencies = {
|
|
|
75
75
|
"strip-ansi": "^7.0.1",
|
|
76
76
|
"ts-jest": "^27.1.1",
|
|
77
77
|
tsup: "^5.10.3",
|
|
78
|
-
typescript: "^4.5.
|
|
78
|
+
typescript: "^4.5.3"
|
|
79
79
|
};
|
|
80
80
|
var files = [
|
|
81
81
|
"dist",
|
|
@@ -207,13 +207,18 @@ async function run() {
|
|
|
207
207
|
default: "./my-turborepo"
|
|
208
208
|
}
|
|
209
209
|
])).dir);
|
|
210
|
+
const isYarnInstalled = shouldUseYarn();
|
|
210
211
|
let answers = await import_inquirer.default.prompt([
|
|
211
212
|
{
|
|
212
213
|
name: "packageManager",
|
|
213
214
|
type: "list",
|
|
214
215
|
message: "Which package manager do you want to use?",
|
|
215
216
|
choices: [
|
|
216
|
-
{
|
|
217
|
+
{
|
|
218
|
+
name: "Yarn",
|
|
219
|
+
value: "yarn",
|
|
220
|
+
disabled: !isYarnInstalled && "not installed"
|
|
221
|
+
},
|
|
217
222
|
{ name: "NPM", value: "npm" }
|
|
218
223
|
]
|
|
219
224
|
},
|
|
@@ -274,34 +279,39 @@ async function run() {
|
|
|
274
279
|
});
|
|
275
280
|
spinner.stop();
|
|
276
281
|
}
|
|
277
|
-
process.chdir(
|
|
282
|
+
process.chdir(projectDir);
|
|
278
283
|
tryGitInit(relativeProjectDir);
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
console.log();
|
|
285
|
-
console.log(`To build all apps and packages, run the following:`);
|
|
286
|
-
console.log();
|
|
284
|
+
console.log(`${import_chalk.default.bold(turboGradient(">>> Success!"))} Your new Turborepo is ready. `);
|
|
285
|
+
console.log();
|
|
286
|
+
console.log(`To build all apps and packages, run the following:`);
|
|
287
|
+
console.log();
|
|
288
|
+
if (!projectDirIsCurrentDir) {
|
|
287
289
|
console.log(` cd ${relativeProjectDir}`);
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
}
|
|
291
|
+
console.log(` ${answers.packageManager} run build`);
|
|
292
|
+
console.log();
|
|
293
|
+
console.log(`To develop all apps and packages, run the following:`);
|
|
294
|
+
console.log();
|
|
295
|
+
if (!projectDirIsCurrentDir) {
|
|
292
296
|
console.log(` cd ${relativeProjectDir}`);
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
}
|
|
298
|
+
console.log(` ${answers.packageManager} run dev`);
|
|
299
|
+
console.log();
|
|
300
|
+
console.log(`Turborepo will cache locally by default. For an additional`);
|
|
301
|
+
console.log(`speed boost, enable Remote Caching (beta) with Vercel by`);
|
|
302
|
+
console.log(`entering the following commands:`);
|
|
303
|
+
console.log();
|
|
304
|
+
if (!projectDirIsCurrentDir) {
|
|
299
305
|
console.log(` cd ${relativeProjectDir}`);
|
|
300
|
-
|
|
301
|
-
|
|
306
|
+
}
|
|
307
|
+
console.log(` npx turbo login`);
|
|
308
|
+
console.log();
|
|
309
|
+
if (projectDirIsCurrentDir) {
|
|
310
|
+
console.log(`For more info, checkout the README`);
|
|
311
|
+
} else {
|
|
302
312
|
console.log(`For more info, checkout the README in ${import_chalk.default.bold(relativeProjectDir)}`);
|
|
303
|
-
console.log(`as well as the official Turborepo docs ${import_chalk.default.underline("https://turborepo.org")}`);
|
|
304
313
|
}
|
|
314
|
+
console.log(`as well as the official Turborepo docs ${import_chalk.default.underline("https://turborepo.org/docs")}`);
|
|
305
315
|
}
|
|
306
316
|
var update = (0, import_update_check.default)(package_default).catch(() => null);
|
|
307
317
|
async function notifyUpdate() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-turbo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Create a new Turborepo",
|
|
5
5
|
"homepage": "https://turborepo.org",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"strip-ansi": "^7.0.1",
|
|
45
45
|
"ts-jest": "^27.1.1",
|
|
46
46
|
"tsup": "^5.10.3",
|
|
47
|
-
"typescript": "^4.5.
|
|
47
|
+
"typescript": "^4.5.3"
|
|
48
48
|
},
|
|
49
49
|
"files": [
|
|
50
50
|
"dist",
|
|
@@ -14,13 +14,13 @@ This turborepo includes the following packages/apps:
|
|
|
14
14
|
- `config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
|
|
15
15
|
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
|
|
16
16
|
|
|
17
|
-
Each package/app is 100% [
|
|
17
|
+
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
|
|
18
18
|
|
|
19
19
|
### Utilities
|
|
20
20
|
|
|
21
21
|
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
25
|
- [Jest](https://jestjs.io) test runner for all things JavaScript
|
|
26
26
|
- [Prettier](https://prettier.io) for code formatting
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "turborepo-basic",
|
|
2
|
+
"name": "turborepo-basic-shared",
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"workspaces": [
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"build": "turbo run build",
|
|
11
11
|
"dev": "turbo run dev --parallel",
|
|
12
12
|
"lint": "turbo run lint",
|
|
13
|
-
"format": "prettier --write
|
|
13
|
+
"format": "prettier --write \"**/*.{ts,tsx,md}\""
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"prettier": "^2.5.1",
|
|
@@ -34,5 +34,9 @@
|
|
|
34
34
|
"cache": false
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
+
},
|
|
38
|
+
"engines": {
|
|
39
|
+
"npm": ">=7.0.0",
|
|
40
|
+
"node": ">=14.0.0"
|
|
37
41
|
}
|
|
38
42
|
}
|
package/templates/npm/README.md
CHANGED
|
@@ -14,13 +14,13 @@ This turborepo uses [NPM](https://www.npmjs.com/) as a package manager. It inclu
|
|
|
14
14
|
- `config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
|
|
15
15
|
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
|
|
16
16
|
|
|
17
|
-
Each package/app is 100% [
|
|
17
|
+
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
|
|
18
18
|
|
|
19
19
|
### Utilities
|
|
20
20
|
|
|
21
21
|
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
25
|
- [Jest](https://jestjs.io) test runner for all things JavaScript
|
|
26
26
|
- [Prettier](https://prettier.io) for code formatting
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "turborepo-basic",
|
|
2
|
+
"name": "turborepo-basic-npm",
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"workspaces": [
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"build": "turbo run build",
|
|
11
11
|
"dev": "turbo run dev --parallel",
|
|
12
12
|
"lint": "turbo run lint",
|
|
13
|
-
"format": "prettier --write
|
|
13
|
+
"format": "prettier --write \"**/*.{ts,tsx,md}\""
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"prettier": "^2.5.1",
|
package/templates/pnpm/README.md
CHANGED
|
@@ -14,13 +14,13 @@ This turborepo uses [PNPM](https://pnpm.io) as a packages manager. It includes t
|
|
|
14
14
|
- `config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
|
|
15
15
|
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
|
|
16
16
|
|
|
17
|
-
Each package/app is 100% [
|
|
17
|
+
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
|
|
18
18
|
|
|
19
19
|
### Utilities
|
|
20
20
|
|
|
21
21
|
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
25
|
- [Jest](https://jestjs.io) test runner for all things JavaScript
|
|
26
26
|
- [Prettier](https://prettier.io) for code formatting
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "turborepo-basic",
|
|
2
|
+
"name": "turborepo-basic-pnpm",
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "turbo run build",
|
|
7
7
|
"dev": "turbo run dev --parallel",
|
|
8
8
|
"lint": "turbo run lint",
|
|
9
|
-
"format": "prettier --write
|
|
9
|
+
"format": "prettier --write \"**/*.{ts,tsx,md}\""
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"prettier": "^2.5.1",
|
package/templates/yarn/README.md
CHANGED
|
@@ -4,7 +4,7 @@ This is an official Yarn v1 starter turborepo.
|
|
|
4
4
|
|
|
5
5
|
## What's inside?
|
|
6
6
|
|
|
7
|
-
This turborepo uses [
|
|
7
|
+
This turborepo uses [Yarn](https://classic.yarnpkg.com/lang/en/) as a package manager. It includes the following packages/apps:
|
|
8
8
|
|
|
9
9
|
### Apps and Packages
|
|
10
10
|
|
|
@@ -14,20 +14,20 @@ This turborepo uses [YARN](https://classic.yarnpkg.com/lang/en/) as a package ma
|
|
|
14
14
|
- `config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
|
|
15
15
|
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
|
|
16
16
|
|
|
17
|
-
Each package/app is 100% [
|
|
17
|
+
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
|
|
18
18
|
|
|
19
19
|
### Utilities
|
|
20
20
|
|
|
21
21
|
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
25
|
- [Jest](https://jestjs.io) test runner for all things JavaScript
|
|
26
26
|
- [Prettier](https://prettier.io) for code formatting
|
|
27
27
|
|
|
28
28
|
## Setup
|
|
29
29
|
|
|
30
|
-
This repository is used in the `npx create-turbo` command, and selected when choosing which package manager you wish to use with your monorepo (
|
|
30
|
+
This repository is used in the `npx create-turbo` command, and selected when choosing which package manager you wish to use with your monorepo (Yarn).
|
|
31
31
|
|
|
32
32
|
### Build
|
|
33
33
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "turborepo-basic",
|
|
2
|
+
"name": "turborepo-basic-yarn",
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"workspaces": [
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"build": "turbo run build",
|
|
11
11
|
"dev": "turbo run dev --parallel",
|
|
12
12
|
"lint": "turbo run lint",
|
|
13
|
-
"format": "prettier --write
|
|
13
|
+
"format": "prettier --write \"**/*.{ts,tsx,md}\""
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"prettier": "^2.5.1",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
$ next build
|
|
2
|
-
info - Checking validity of types...
|
|
3
|
-
info - Creating an optimized production build...
|
|
4
|
-
info - Compiled successfully
|
|
5
|
-
info - Collecting page data...
|
|
6
|
-
info - Generating static pages (0/3)
|
|
7
|
-
info - Generating static pages (3/3)
|
|
8
|
-
info - Finalizing page optimization...
|
|
9
|
-
|
|
10
|
-
Page Size First Load JS
|
|
11
|
-
┌ ○ / 300 B 72.1 kB
|
|
12
|
-
└ ○ /404 195 B 72 kB
|
|
13
|
-
+ First Load JS shared by all 71.8 kB
|
|
14
|
-
├ chunks/framework-5d080e09fe9ac4b0.js 42 kB
|
|
15
|
-
├ chunks/main-5c6e89d795c5887e.js 27.8 kB
|
|
16
|
-
├ chunks/pages/_app-0ab73c0f312e3041.js 1.23 kB
|
|
17
|
-
└ chunks/webpack-45f9f9587e6c08e1.js 729 B
|
|
18
|
-
|
|
19
|
-
○ (Static) automatically rendered as static HTML (uses no initial props)
|
|
20
|
-
|
|
21
|
-
error - ESLint: Plugin "import" was conflicted between "../.eslintrc.js » eslint-config-next" and "../../../.eslintrc.js » eslint-config-next".
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
$ next build
|
|
2
|
-
info - Checking validity of types...
|
|
3
|
-
info - Creating an optimized production build...
|
|
4
|
-
info - Compiled successfully
|
|
5
|
-
info - Collecting page data...
|
|
6
|
-
info - Generating static pages (0/3)
|
|
7
|
-
info - Generating static pages (3/3)
|
|
8
|
-
info - Finalizing page optimization...
|
|
9
|
-
|
|
10
|
-
Page Size First Load JS
|
|
11
|
-
┌ ○ / 300 B 72.1 kB
|
|
12
|
-
└ ○ /404 195 B 72 kB
|
|
13
|
-
+ First Load JS shared by all 71.8 kB
|
|
14
|
-
├ chunks/framework-5d080e09fe9ac4b0.js 42 kB
|
|
15
|
-
├ chunks/main-5c6e89d795c5887e.js 27.8 kB
|
|
16
|
-
├ chunks/pages/_app-0ab73c0f312e3041.js 1.23 kB
|
|
17
|
-
└ chunks/webpack-45f9f9587e6c08e1.js 729 B
|
|
18
|
-
|
|
19
|
-
○ (Static) automatically rendered as static HTML (uses no initial props)
|
|
20
|
-
|
|
21
|
-
error - ESLint: Plugin "import" was conflicted between "../.eslintrc.js » eslint-config-next" and "../../../.eslintrc.js » eslint-config-next".
|