create-turbo 1.8.4-canary.3 → 1.9.0-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/dist/cli.js +196 -0
  2. package/package.json +16 -10
  3. package/dist/index.js +0 -424
  4. package/templates/_shared_ts/.eslintrc.js +0 -10
  5. package/templates/_shared_ts/README.md +0 -25
  6. package/templates/_shared_ts/apps/docs/.eslintrc.js +0 -4
  7. package/templates/_shared_ts/apps/docs/README.md +0 -30
  8. package/templates/_shared_ts/apps/docs/next-env.d.ts +0 -5
  9. package/templates/_shared_ts/apps/docs/next.config.js +0 -4
  10. package/templates/_shared_ts/apps/docs/package.json +0 -27
  11. package/templates/_shared_ts/apps/docs/pages/index.tsx +0 -10
  12. package/templates/_shared_ts/apps/docs/tsconfig.json +0 -5
  13. package/templates/_shared_ts/apps/web/.eslintrc.js +0 -4
  14. package/templates/_shared_ts/apps/web/README.md +0 -30
  15. package/templates/_shared_ts/apps/web/next-env.d.ts +0 -5
  16. package/templates/_shared_ts/apps/web/next.config.js +0 -4
  17. package/templates/_shared_ts/apps/web/package.json +0 -27
  18. package/templates/_shared_ts/apps/web/pages/index.tsx +0 -10
  19. package/templates/_shared_ts/apps/web/tsconfig.json +0 -5
  20. package/templates/_shared_ts/gitignore +0 -33
  21. package/templates/_shared_ts/package.json +0 -23
  22. package/templates/_shared_ts/packages/eslint-config-custom/index.js +0 -6
  23. package/templates/_shared_ts/packages/eslint-config-custom/package.json +0 -19
  24. package/templates/_shared_ts/packages/tsconfig/README.md +0 -3
  25. package/templates/_shared_ts/packages/tsconfig/base.json +0 -20
  26. package/templates/_shared_ts/packages/tsconfig/nextjs.json +0 -22
  27. package/templates/_shared_ts/packages/tsconfig/package.json +0 -10
  28. package/templates/_shared_ts/packages/tsconfig/react-library.json +0 -11
  29. package/templates/_shared_ts/packages/ui/Button.tsx +0 -4
  30. package/templates/_shared_ts/packages/ui/index.tsx +0 -2
  31. package/templates/_shared_ts/packages/ui/package.json +0 -18
  32. package/templates/_shared_ts/packages/ui/tsconfig.json +0 -5
  33. package/templates/_shared_ts/turbo.json +0 -16
  34. package/templates/berry/.yarnrc.yml +0 -1
  35. package/templates/berry/README.md +0 -73
  36. package/templates/npm/README.md +0 -73
  37. package/templates/pnpm/README.md +0 -73
  38. package/templates/pnpm/apps/docs/package.json +0 -27
  39. package/templates/pnpm/apps/web/package.json +0 -27
  40. package/templates/pnpm/package.json +0 -19
  41. package/templates/pnpm/packages/ui/package.json +0 -19
  42. package/templates/pnpm/pnpm-workspace.yaml +0 -3
  43. package/templates/yarn/README.md +0 -73
  44. package/templates/yarn/package.json +0 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-turbo",
3
- "version": "1.8.4-canary.3",
3
+ "version": "1.9.0-alpha.0",
4
4
  "description": "Create a new Turborepo",
5
5
  "homepage": "https://turbo.build/repo",
6
6
  "license": "MPL-2.0",
@@ -13,22 +13,27 @@
13
13
  "url": "https://github.com/vercel/turbo/issues"
14
14
  },
15
15
  "bin": {
16
- "create-turbo": "dist/index.js"
16
+ "create-turbo": "dist/cli.js"
17
17
  },
18
18
  "dependencies": {
19
+ "async-retry": "^1.3.3",
19
20
  "chalk": "2.4.2",
21
+ "commander": "^10.0.0",
22
+ "cross-spawn": "^7.0.3",
20
23
  "execa": "5.1.1",
21
24
  "fs-extra": "^10.1.0",
25
+ "got": "^10.7.0",
22
26
  "gradient-string": "^2.0.0",
23
27
  "inquirer": "^8.0.0",
24
- "meow": "^7.1.1",
25
28
  "ora": "4.1.1",
26
29
  "rimraf": "^3.0.2",
27
- "semver": "^7.3.7",
30
+ "semver": "^7.3.8",
31
+ "tar": "6.1.13",
28
32
  "update-check": "^1.5.4"
29
33
  },
30
34
  "devDependencies": {
31
- "@types/chalk-animation": "^1.6.0",
35
+ "@types/async-retry": "^1.4.5",
36
+ "@types/cross-spawn": "^6.0.2",
32
37
  "@types/fs-extra": "^9.0.13",
33
38
  "@types/gradient-string": "^1.1.2",
34
39
  "@types/inquirer": "^7.3.1",
@@ -36,18 +41,19 @@
36
41
  "@types/node": "^16.11.12",
37
42
  "@types/rimraf": "^3.0.2",
38
43
  "@types/semver": "^7.3.9",
44
+ "@types/tar": "^6.1.4",
39
45
  "eslint": "^7.23.0",
40
46
  "jest": "^27.4.3",
41
- "semver": "^7.3.5",
42
47
  "strip-ansi": "^6.0.1",
43
48
  "ts-jest": "^27.1.1",
44
- "tsconfig": "0.0.0",
45
49
  "tsup": "^5.10.3",
46
- "typescript": "^4.5.5"
50
+ "typescript": "^4.5.5",
51
+ "@turbo/workspaces": "0.0.3",
52
+ "turbo-utils": "0.0.0",
53
+ "tsconfig": "0.0.0"
47
54
  },
48
55
  "files": [
49
- "dist",
50
- "templates"
56
+ "dist"
51
57
  ],
52
58
  "scripts": {
53
59
  "build": "tsup",
package/dist/index.js DELETED
@@ -1,424 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
18
-
19
- // src/index.ts
20
- var path2 = __toESM(require("path"));
21
- var import_execa = __toESM(require("execa"));
22
- var import_fs_extra = __toESM(require("fs-extra"));
23
- var import_inquirer = __toESM(require("inquirer"));
24
- var import_ora = __toESM(require("ora"));
25
- var import_meow = __toESM(require("meow"));
26
- var import_gradient_string = __toESM(require("gradient-string"));
27
- var import_update_check = __toESM(require("update-check"));
28
- var import_satisfies = __toESM(require("semver/functions/satisfies"));
29
- var import_prerelease = __toESM(require("semver/functions/prerelease"));
30
- var import_chalk = __toESM(require("chalk"));
31
-
32
- // package.json
33
- var package_default = {
34
- name: "create-turbo",
35
- version: "1.8.4-canary.3",
36
- description: "Create a new Turborepo",
37
- homepage: "https://turbo.build/repo",
38
- license: "MPL-2.0",
39
- repository: {
40
- type: "git",
41
- url: "https://github.com/vercel/turbo",
42
- directory: "packages/create-turbo"
43
- },
44
- bugs: {
45
- url: "https://github.com/vercel/turbo/issues"
46
- },
47
- bin: {
48
- "create-turbo": "dist/index.js"
49
- },
50
- scripts: {
51
- build: "tsup",
52
- test: "jest",
53
- lint: "eslint src/**/*.ts",
54
- "check-types": "tsc --noEmit"
55
- },
56
- dependencies: {
57
- chalk: "2.4.2",
58
- execa: "5.1.1",
59
- "fs-extra": "^10.1.0",
60
- "gradient-string": "^2.0.0",
61
- inquirer: "^8.0.0",
62
- meow: "^7.1.1",
63
- ora: "4.1.1",
64
- rimraf: "^3.0.2",
65
- semver: "^7.3.7",
66
- "update-check": "^1.5.4"
67
- },
68
- devDependencies: {
69
- "@types/chalk-animation": "^1.6.0",
70
- "@types/fs-extra": "^9.0.13",
71
- "@types/gradient-string": "^1.1.2",
72
- "@types/inquirer": "^7.3.1",
73
- "@types/jest": "^27.4.0",
74
- "@types/node": "^16.11.12",
75
- "@types/rimraf": "^3.0.2",
76
- "@types/semver": "^7.3.9",
77
- eslint: "^7.23.0",
78
- jest: "^27.4.3",
79
- semver: "^7.3.5",
80
- "strip-ansi": "^6.0.1",
81
- "ts-jest": "^27.1.1",
82
- tsconfig: "workspace:*",
83
- tsup: "^5.10.3",
84
- typescript: "^4.5.5"
85
- },
86
- files: [
87
- "dist",
88
- "templates"
89
- ]
90
- };
91
-
92
- // src/shouldUseYarn.ts
93
- var import_child_process = require("child_process");
94
- function shouldUseYarn() {
95
- try {
96
- const userAgent = process.env.npm_config_user_agent;
97
- if (userAgent && userAgent.startsWith("yarn")) {
98
- return true;
99
- }
100
- (0, import_child_process.execSync)("yarnpkg --version", { stdio: "ignore" });
101
- return true;
102
- } catch (e) {
103
- return false;
104
- }
105
- }
106
-
107
- // src/shouldUsePnpm.ts
108
- var import_child_process2 = require("child_process");
109
- function shouldUsePnpm() {
110
- try {
111
- const userAgent = process.env.npm_config_user_agent;
112
- if (userAgent && userAgent.startsWith("pnpm")) {
113
- return true;
114
- }
115
- (0, import_child_process2.execSync)("pnpm --version", { stdio: "ignore" });
116
- return true;
117
- } catch (e) {
118
- return false;
119
- }
120
- }
121
-
122
- // src/git.ts
123
- var import_child_process3 = require("child_process");
124
- var import_path = __toESM(require("path"));
125
- var import_rimraf = __toESM(require("rimraf"));
126
- function isInGitRepository() {
127
- try {
128
- (0, import_child_process3.execSync)("git rev-parse --is-inside-work-tree", { stdio: "ignore" });
129
- return true;
130
- } catch (_) {
131
- }
132
- return false;
133
- }
134
- function isInMercurialRepository() {
135
- try {
136
- (0, import_child_process3.execSync)("hg --cwd . root", { stdio: "ignore" });
137
- return true;
138
- } catch (_) {
139
- }
140
- return false;
141
- }
142
- function tryGitInit(root) {
143
- let didInit = false;
144
- try {
145
- (0, import_child_process3.execSync)("git --version", { stdio: "ignore" });
146
- if (isInGitRepository() || isInMercurialRepository()) {
147
- return false;
148
- }
149
- (0, import_child_process3.execSync)("git init", { stdio: "ignore" });
150
- didInit = true;
151
- (0, import_child_process3.execSync)("git checkout -b main", { stdio: "ignore" });
152
- (0, import_child_process3.execSync)("git add -A", { stdio: "ignore" });
153
- (0, import_child_process3.execSync)('git commit -m "Initial commit from Create Turborepo"', {
154
- stdio: "ignore"
155
- });
156
- return true;
157
- } catch (e) {
158
- if (didInit) {
159
- try {
160
- import_rimraf.default.sync(import_path.default.join(root, ".git"));
161
- } catch (_) {
162
- }
163
- }
164
- return false;
165
- }
166
- }
167
-
168
- // src/constants.ts
169
- var PACKAGE_MANAGERS = {
170
- npm: [
171
- {
172
- name: "npm",
173
- template: "npm",
174
- command: "npm",
175
- installArgs: ["install"],
176
- version: "latest",
177
- executable: "npx",
178
- semver: "*"
179
- }
180
- ],
181
- pnpm: [
182
- {
183
- name: "pnpm6",
184
- template: "pnpm",
185
- command: "pnpm",
186
- installArgs: ["install"],
187
- version: "latest-6",
188
- executable: "pnpx",
189
- semver: "6.x"
190
- },
191
- {
192
- name: "pnpm",
193
- template: "pnpm",
194
- command: "pnpm",
195
- installArgs: ["install"],
196
- version: "latest",
197
- executable: "pnpm dlx",
198
- semver: ">=7"
199
- }
200
- ],
201
- yarn: [
202
- {
203
- name: "yarn",
204
- template: "yarn",
205
- command: "yarn",
206
- installArgs: ["install"],
207
- version: "1.x",
208
- executable: "npx",
209
- semver: "<2"
210
- },
211
- {
212
- name: "berry",
213
- template: "berry",
214
- command: "yarn",
215
- installArgs: ["install", "--no-immutable"],
216
- version: "stable",
217
- executable: "yarn dlx",
218
- semver: ">=2"
219
- }
220
- ]
221
- };
222
-
223
- // src/getPackageManagerVersion.ts
224
- var import_child_process4 = require("child_process");
225
- var getPackageManagerVersion = (command) => {
226
- return (0, import_child_process4.execSync)(`${command} --version`).toString().trim();
227
- };
228
-
229
- // src/index.ts
230
- var turboGradient = (0, import_gradient_string.default)("#0099F7", "#F11712");
231
- var help = `
232
- Usage:
233
- $ npx create-turbo [flags...] [<dir>]
234
-
235
- If <dir> is not provided up front you will be prompted for it.
236
-
237
- Flags:
238
- --use-npm Explicitly tell the CLI to bootstrap the app using npm
239
- --use-pnpm Explicitly tell the CLI to bootstrap the app using pnpm
240
- --use-yarn Explicitly tell the CLI to bootstrap the app using yarn
241
- --no-install Explicitly do not run the package manager's install command
242
- --help, -h Show this help message
243
- --version, -v Show the version of this script
244
- `;
245
- run().then(notifyUpdate).catch(async (reason) => {
246
- console.log();
247
- console.log("Aborting installation.");
248
- if (reason.command) {
249
- console.log(` ${import_chalk.default.cyan(reason.command)} has failed.`);
250
- } else {
251
- console.log(import_chalk.default.red("Unexpected error. Please report it as a bug:"));
252
- console.log(reason);
253
- }
254
- console.log();
255
- await notifyUpdate();
256
- process.exit(1);
257
- });
258
- async function run() {
259
- var _a;
260
- let { input, flags } = (0, import_meow.default)(help, {
261
- booleanDefault: void 0,
262
- flags: {
263
- help: { type: "boolean", default: false, alias: "h" },
264
- useNpm: { type: "boolean", default: false },
265
- usePnpm: { type: "boolean", default: false },
266
- useYarn: { type: "boolean", default: false },
267
- install: { type: "boolean", default: true },
268
- version: { type: "boolean", default: false, alias: "v" }
269
- }
270
- });
271
- console.log(import_chalk.default.bold(turboGradient(`
272
- >>> TURBOREPO
273
- `)));
274
- await new Promise((resolve2) => setTimeout(resolve2, 500));
275
- console.log(">>> Welcome to Turborepo! Let's get you set up with a new codebase.");
276
- console.log();
277
- let projectDir = path2.resolve(process.cwd(), input.length > 0 ? input[0] : (await import_inquirer.default.prompt([
278
- {
279
- type: "input",
280
- name: "dir",
281
- message: "Where would you like to create your turborepo?",
282
- default: "./my-turborepo"
283
- }
284
- ])).dir);
285
- const projectName = path2.basename(projectDir);
286
- const isYarnInstalled = shouldUseYarn();
287
- const isPnpmInstalled = shouldUsePnpm();
288
- let answers;
289
- if (flags.useNpm) {
290
- answers = { packageManager: "npm" };
291
- } else if (flags.usePnpm) {
292
- answers = { packageManager: "pnpm" };
293
- } else if (flags.useYarn) {
294
- answers = { packageManager: "yarn" };
295
- } else {
296
- answers = await import_inquirer.default.prompt([
297
- {
298
- name: "packageManager",
299
- type: "list",
300
- message: "Which package manager do you want to use?",
301
- choices: [
302
- { name: "npm", value: "npm" },
303
- {
304
- name: "pnpm",
305
- value: "pnpm",
306
- disabled: !isPnpmInstalled && "not installed"
307
- },
308
- {
309
- name: "yarn",
310
- value: "yarn",
311
- disabled: !isYarnInstalled && "not installed"
312
- }
313
- ]
314
- }
315
- ]);
316
- }
317
- let relativeProjectDir = path2.relative(process.cwd(), projectDir);
318
- let projectDirIsCurrentDir = relativeProjectDir === "";
319
- if (!projectDirIsCurrentDir) {
320
- if (import_fs_extra.default.existsSync(projectDir) && import_fs_extra.default.readdirSync(projectDir).length !== 0) {
321
- console.log(`\uFE0F\u{1F6A8} Oops, "${relativeProjectDir}" already exists. Please try again with a different directory.`);
322
- process.exit(1);
323
- } else {
324
- import_fs_extra.default.mkdirSync(projectDir, { recursive: true });
325
- }
326
- }
327
- let sharedTemplate = path2.resolve(__dirname, "../templates", `_shared_ts`);
328
- import_fs_extra.default.copySync(sharedTemplate, projectDir, { recursive: true });
329
- let packageManagerVersion = getPackageManagerVersion(answers.packageManager);
330
- let packageManagerConfigs = PACKAGE_MANAGERS[answers.packageManager];
331
- let packageManager = packageManagerConfigs.find((packageManager2) => (0, import_satisfies.default)(packageManagerVersion, packageManager2.semver));
332
- if (!packageManager) {
333
- throw new Error("Unsupported package manager version.");
334
- }
335
- let packageManagerTemplate = path2.resolve(__dirname, "../templates", packageManager.template);
336
- if (import_fs_extra.default.existsSync(packageManagerTemplate)) {
337
- import_fs_extra.default.copySync(packageManagerTemplate, projectDir, {
338
- recursive: true,
339
- overwrite: true
340
- });
341
- }
342
- import_fs_extra.default.renameSync(path2.join(projectDir, "gitignore"), path2.join(projectDir, ".gitignore"));
343
- let sharedPkg = require(path2.join(sharedTemplate, "package.json"));
344
- let projectPkg = require(path2.join(projectDir, "package.json"));
345
- ["dependencies", "devDependencies"].forEach((pkgKey) => {
346
- sharedPkg[pkgKey] = {
347
- ...sharedPkg[pkgKey],
348
- ...projectPkg[pkgKey]
349
- };
350
- });
351
- sharedPkg.packageManager = `${packageManager.command}@${packageManagerVersion}`;
352
- sharedPkg.name = projectName;
353
- const shouldUsePreRelease = (0, import_prerelease.default)(package_default.version) !== null;
354
- if (shouldUsePreRelease && ((_a = sharedPkg == null ? void 0 : sharedPkg.devDependencies) == null ? void 0 : _a.turbo)) {
355
- sharedPkg.devDependencies.turbo = "canary";
356
- }
357
- import_fs_extra.default.writeFileSync(path2.join(projectDir, "package.json"), JSON.stringify(sharedPkg, null, 2));
358
- console.log();
359
- console.log(`>>> Created a new turborepo with the following:`);
360
- console.log();
361
- console.log(` - ${import_chalk.default.bold("apps/web")}: Next.js with TypeScript`);
362
- console.log(` - ${import_chalk.default.bold("apps/docs")}: Next.js with TypeScript`);
363
- console.log(` - ${import_chalk.default.bold("packages/ui")}: Shared React component library`);
364
- console.log(` - ${import_chalk.default.bold("packages/eslint-config-custom")}: Shared configuration (ESLint)`);
365
- console.log(` - ${import_chalk.default.bold("packages/tsconfig")}: Shared TypeScript \`tsconfig.json\``);
366
- console.log();
367
- if (flags.install) {
368
- const spinner = (0, import_ora.default)({
369
- text: "Installing dependencies...",
370
- spinner: {
371
- frames: [" ", "> ", ">> ", ">>>"]
372
- }
373
- }).start();
374
- await (0, import_execa.default)(`${packageManager.command}`, packageManager.installArgs, {
375
- stdio: "ignore",
376
- cwd: projectDir
377
- });
378
- spinner.stop();
379
- }
380
- process.chdir(projectDir);
381
- tryGitInit(relativeProjectDir);
382
- if (projectDirIsCurrentDir) {
383
- console.log(`${import_chalk.default.bold(turboGradient(">>> Success!"))} Your new Turborepo is ready.`);
384
- console.log("Inside this directory, you can run several commands:");
385
- } else {
386
- console.log(`${import_chalk.default.bold(turboGradient(">>> Success!"))} Created a new Turborepo at "${relativeProjectDir}".`);
387
- console.log("Inside that directory, you can run several commands:");
388
- }
389
- console.log();
390
- console.log(import_chalk.default.cyan(` ${packageManager.command} run build`));
391
- console.log(` Build all apps and packages`);
392
- console.log();
393
- console.log(import_chalk.default.cyan(` ${packageManager.command} run dev`));
394
- console.log(` Develop all apps and packages`);
395
- console.log();
396
- console.log(`Turborepo will cache locally by default. For an additional`);
397
- console.log(`speed boost, enable Remote Caching with Vercel by`);
398
- console.log(`entering the following command:`);
399
- console.log();
400
- console.log(import_chalk.default.cyan(` ${packageManager.executable} turbo login`));
401
- console.log();
402
- console.log(`We suggest that you begin by typing:`);
403
- console.log();
404
- if (!projectDirIsCurrentDir) {
405
- console.log(` ${import_chalk.default.cyan("cd")} ${relativeProjectDir}`);
406
- }
407
- console.log(import_chalk.default.cyan(` ${packageManager.executable} turbo login`));
408
- console.log();
409
- }
410
- var update = (0, import_update_check.default)(package_default).catch(() => null);
411
- async function notifyUpdate() {
412
- try {
413
- const res = await update;
414
- if (res == null ? void 0 : res.latest) {
415
- const isYarn = shouldUseYarn();
416
- console.log();
417
- console.log(import_chalk.default.yellow.bold("A new version of `create-turbo` is available!"));
418
- console.log("You can update by running: " + import_chalk.default.cyan(isYarn ? "yarn global add create-turbo" : "npm i -g create-turbo"));
419
- console.log();
420
- }
421
- process.exit();
422
- } catch {
423
- }
424
- }
@@ -1,10 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- // This tells ESLint to load the config from the package `eslint-config-custom`
4
- extends: ["custom"],
5
- settings: {
6
- next: {
7
- rootDir: ["apps/*/"],
8
- },
9
- },
10
- };
@@ -1,25 +0,0 @@
1
- # Turborepo starter
2
-
3
- This is an official Yarn v1 starter turborepo.
4
-
5
- ## What's inside?
6
-
7
- This turborepo includes the following packages/apps:
8
-
9
- ### Apps and Packages
10
-
11
- - `docs`: a [Next.js](https://nextjs.org/) app
12
- - `web`: another [Next.js](https://nextjs.org/) app
13
- - `ui`: a stub React component library shared by both `web` and `docs` applications
14
- - `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
15
- - `tsconfig`: `tsconfig.json`s used throughout the monorepo
16
-
17
- Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
18
-
19
- ### Utilities
20
-
21
- This turborepo has some additional tools already setup for you:
22
-
23
- - [TypeScript](https://www.typescriptlang.org/) for static type checking
24
- - [ESLint](https://eslint.org/) for code linting
25
- - [Prettier](https://prettier.io) for code formatting
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ["custom"],
4
- };
@@ -1,30 +0,0 @@
1
- ## Getting Started
2
-
3
- First, run the development server:
4
-
5
- ```bash
6
- yarn dev
7
- ```
8
-
9
- Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
10
-
11
- You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
12
-
13
- [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
14
-
15
- The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
16
-
17
- ## Learn More
18
-
19
- To learn more about Next.js, take a look at the following resources:
20
-
21
- - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
22
- - [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial.
23
-
24
- You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
25
-
26
- ## Deploy on Vercel
27
-
28
- The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.
29
-
30
- Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
@@ -1,5 +0,0 @@
1
- /// <reference types="next" />
2
- /// <reference types="next/image-types/global" />
3
-
4
- // NOTE: This file should not be edited
5
- // see https://nextjs.org/docs/basic-features/typescript for more information.
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- reactStrictMode: true,
3
- transpilePackages: ["ui"],
4
- };
@@ -1,27 +0,0 @@
1
- {
2
- "name": "docs",
3
- "version": "0.0.0",
4
- "private": true,
5
- "scripts": {
6
- "dev": "next dev --port 3001",
7
- "build": "next build",
8
- "start": "next start",
9
- "lint": "next lint"
10
- },
11
- "dependencies": {
12
- "next": "^13.1.1",
13
- "react": "^18.2.0",
14
- "react-dom": "^18.2.0",
15
- "ui": "*"
16
- },
17
- "devDependencies": {
18
- "@babel/core": "^7.0.0",
19
- "eslint": "7.32.0",
20
- "eslint-config-custom": "*",
21
- "tsconfig": "*",
22
- "@types/node": "^17.0.12",
23
- "@types/react": "^18.0.22",
24
- "@types/react-dom": "^18.0.7",
25
- "typescript": "^4.5.3"
26
- }
27
- }
@@ -1,10 +0,0 @@
1
- import { Button } from "ui";
2
-
3
- export default function Docs() {
4
- return (
5
- <div>
6
- <h1>Docs</h1>
7
- <Button />
8
- </div>
9
- );
10
- }
@@ -1,5 +0,0 @@
1
- {
2
- "extends": "tsconfig/nextjs.json",
3
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
4
- "exclude": ["node_modules"]
5
- }
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ["custom"],
4
- };
@@ -1,30 +0,0 @@
1
- ## Getting Started
2
-
3
- First, run the development server:
4
-
5
- ```bash
6
- yarn dev
7
- ```
8
-
9
- Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
10
-
11
- You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
12
-
13
- [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
14
-
15
- The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
16
-
17
- ## Learn More
18
-
19
- To learn more about Next.js, take a look at the following resources:
20
-
21
- - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
22
- - [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial.
23
-
24
- You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
25
-
26
- ## Deploy on Vercel
27
-
28
- The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.
29
-
30
- Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
@@ -1,5 +0,0 @@
1
- /// <reference types="next" />
2
- /// <reference types="next/image-types/global" />
3
-
4
- // NOTE: This file should not be edited
5
- // see https://nextjs.org/docs/basic-features/typescript for more information.
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- reactStrictMode: true,
3
- transpilePackages: ["ui"],
4
- };