create-turbo 1.2.13 → 1.2.16
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +26 -8
- package/package.json +1 -1
- package/templates/_shared_ts/package.json +1 -0
- /package/templates/_shared_ts/packages/{eslint-config-acme → eslint-config-custom}/index.js +0 -0
- /package/templates/_shared_ts/packages/{eslint-config-acme → eslint-config-custom}/package.json +0 -0
package/dist/index.js
CHANGED
@@ -3,8 +3,22 @@ var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
6
7
|
var __getProtoOf = Object.getPrototypeOf;
|
7
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
11
|
+
var __spreadValues = (a, b) => {
|
12
|
+
for (var prop in b || (b = {}))
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
15
|
+
if (__getOwnPropSymbols)
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
17
|
+
if (__propIsEnum.call(b, prop))
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
19
|
+
}
|
20
|
+
return a;
|
21
|
+
};
|
8
22
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
9
23
|
var __reExport = (target, module2, copyDefault, desc) => {
|
10
24
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
@@ -31,7 +45,7 @@ var import_chalk = __toESM(require("chalk"));
|
|
31
45
|
|
32
46
|
// package.json
|
33
47
|
var name = "create-turbo";
|
34
|
-
var version = "1.2.
|
48
|
+
var version = "1.2.16";
|
35
49
|
var description = "Create a new Turborepo";
|
36
50
|
var homepage = "https://turborepo.org";
|
37
51
|
var license = "MPL-2.0";
|
@@ -250,6 +264,7 @@ async function run() {
|
|
250
264
|
default: "./my-turborepo"
|
251
265
|
}
|
252
266
|
])).dir);
|
267
|
+
const projectName = path2.basename(projectDir);
|
253
268
|
const isYarnInstalled = shouldUseYarn();
|
254
269
|
const isPnpmInstalled = shouldUsePnpm();
|
255
270
|
let answers;
|
@@ -296,16 +311,19 @@ async function run() {
|
|
296
311
|
await import_fs_extra.default.copy(serverTemplate, projectDir, { overwrite: true });
|
297
312
|
}
|
298
313
|
await import_fs_extra.default.move(path2.join(projectDir, "gitignore"), path2.join(projectDir, ".gitignore"));
|
299
|
-
let
|
314
|
+
let sharedPkg = require(path2.join(sharedTemplate, "package.json"));
|
315
|
+
let projectPkg = require(path2.join(projectDir, "package.json"));
|
300
316
|
["dependencies", "devDependencies"].forEach((pkgKey) => {
|
301
|
-
|
302
|
-
|
303
|
-
|
317
|
+
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`;
|
304
321
|
}
|
305
322
|
}
|
306
323
|
});
|
307
|
-
|
308
|
-
|
324
|
+
sharedPkg.packageManager = `${answers.packageManager}@${getPackageManagerVersion(answers.packageManager)}`;
|
325
|
+
sharedPkg.name = projectName;
|
326
|
+
await import_fs_extra.default.writeFile(path2.join(projectDir, "package.json"), JSON.stringify(sharedPkg, null, 2));
|
309
327
|
if (flags.install) {
|
310
328
|
console.log();
|
311
329
|
console.log(`>>> Creating a new turborepo with the following:`);
|
@@ -313,7 +331,7 @@ async function run() {
|
|
313
331
|
console.log(` - ${import_chalk.default.bold("apps/web")}: Next.js with TypeScript`);
|
314
332
|
console.log(` - ${import_chalk.default.bold("apps/docs")}: Next.js with TypeScript`);
|
315
333
|
console.log(` - ${import_chalk.default.bold("packages/ui")}: Shared React component library`);
|
316
|
-
console.log(` - ${import_chalk.default.bold("packages/config")}: Shared configuration (ESLint)`);
|
334
|
+
console.log(` - ${import_chalk.default.bold("packages/eslint-config-custom")}: Shared configuration (ESLint)`);
|
317
335
|
console.log(` - ${import_chalk.default.bold("packages/tsconfig")}: Shared TypeScript \`tsconfig.json\``);
|
318
336
|
console.log();
|
319
337
|
const spinner = (0, import_ora.default)({
|
package/package.json
CHANGED
File without changes
|
/package/templates/_shared_ts/packages/{eslint-config-acme → eslint-config-custom}/package.json
RENAMED
File without changes
|