create-tina-app 1.5.1 → 1.6.0
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 +16 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var require_package = __commonJS({
|
|
|
34
34
|
"package.json"(exports2, module2) {
|
|
35
35
|
module2.exports = {
|
|
36
36
|
name: "create-tina-app",
|
|
37
|
-
version: "1.
|
|
37
|
+
version: "1.6.0",
|
|
38
38
|
main: "dist/index.js",
|
|
39
39
|
files: [
|
|
40
40
|
"dist",
|
|
@@ -337,15 +337,15 @@ var import_path3 = __toESM(require("path"));
|
|
|
337
337
|
var TEMPLATES = [
|
|
338
338
|
{
|
|
339
339
|
title: "\u2B50 NextJS starter",
|
|
340
|
-
description: "Kickstart your project with
|
|
341
|
-
value: "tina-
|
|
340
|
+
description: "Kickstart your project with Next.js \u2013 our top recommendation for a seamless, performant, and versatile web experience.",
|
|
341
|
+
value: "tina-nextjs-starter",
|
|
342
342
|
isInternal: false,
|
|
343
|
-
gitURL: "https://github.com/tinacms/tina-
|
|
343
|
+
gitURL: "https://github.com/tinacms/tina-nextjs-starter",
|
|
344
344
|
devUrl: "http://localhost:3000"
|
|
345
345
|
},
|
|
346
346
|
{
|
|
347
347
|
title: "\u2B50\uFE0F TinaDocs",
|
|
348
|
-
description: "Get your documentation site up and running with TinaCMS and Next.
|
|
348
|
+
description: "Get your documentation site up and running with TinaCMS and Next.js in minutes.",
|
|
349
349
|
value: "tina-docs",
|
|
350
350
|
isInternal: false,
|
|
351
351
|
gitURL: "https://github.com/tinacms/tina-docs",
|
|
@@ -448,7 +448,6 @@ async function checkPackageExists(name2) {
|
|
|
448
448
|
|
|
449
449
|
// src/index.ts
|
|
450
450
|
var import_node_process = require("node:process");
|
|
451
|
-
var import_ora = __toESM(require("ora"));
|
|
452
451
|
|
|
453
452
|
// src/util/options.ts
|
|
454
453
|
var import_commander = require("commander");
|
|
@@ -529,6 +528,8 @@ var THEMES = [
|
|
|
529
528
|
|
|
530
529
|
// src/index.ts
|
|
531
530
|
async function run() {
|
|
531
|
+
const ora = (await import("ora")).default;
|
|
532
|
+
let packageManagerInstallationHadError = false;
|
|
532
533
|
if (process.stdout.columns >= 60) {
|
|
533
534
|
console.log(TextStyles.tinaOrange(`${llama}`));
|
|
534
535
|
console.log(TextStyles.tinaOrange(`${tinaCms}`));
|
|
@@ -537,7 +538,7 @@ async function run() {
|
|
|
537
538
|
}
|
|
538
539
|
const version2 = require_package().version;
|
|
539
540
|
console.log(`Create Tina App v${version2}`);
|
|
540
|
-
const spinner = (
|
|
541
|
+
const spinner = ora();
|
|
541
542
|
preRunChecks(spinner);
|
|
542
543
|
const opts = extractOptions(process.argv);
|
|
543
544
|
const telemetry = new import_metrics.Telemetry({ disabled: opts?.noTelemetry });
|
|
@@ -668,7 +669,7 @@ async function run() {
|
|
|
668
669
|
spinner.succeed();
|
|
669
670
|
} catch (err) {
|
|
670
671
|
spinner.fail(`Failed to install packages: ${err.message}`);
|
|
671
|
-
|
|
672
|
+
packageManagerInstallationHadError = true;
|
|
672
673
|
}
|
|
673
674
|
spinner.start("Initializing git repository.");
|
|
674
675
|
try {
|
|
@@ -690,7 +691,8 @@ async function run() {
|
|
|
690
691
|
const padCommand = (cmd, width = 20) => TextStyles.cmd(cmd) + " ".repeat(Math.max(0, width - cmd.length));
|
|
691
692
|
spinner.info(`${TextStyles.bold("To get started:")}
|
|
692
693
|
|
|
693
|
-
${padCommand(`cd ${appName}`)}# move into your project directory
|
|
694
|
+
${padCommand(`cd ${appName}`)}# move into your project directory${packageManagerInstallationHadError ? `
|
|
695
|
+
${padCommand(`${pkgManager} install`)}# install dependencies` : ""}
|
|
694
696
|
${padCommand(`${pkgManager} run dev`)}# start the dev server ${TextStyles.link(template.devUrl)}
|
|
695
697
|
${padCommand(`${pkgManager} run build`)}# build the app for production
|
|
696
698
|
`);
|
|
@@ -705,10 +707,13 @@ async function run() {
|
|
|
705
707
|
` \u2022 \u{1F58C}\uFE0F Extend Tina with custom field components: ${TextStyles.link("https://tina.io/docs/advanced/extending-tina/")}`
|
|
706
708
|
);
|
|
707
709
|
console.log(
|
|
708
|
-
` \u2022 \u{1F680} Deploy to Production: ${TextStyles.link("https://tina.io/docs/
|
|
710
|
+
` \u2022 \u{1F680} Deploy to Production: ${TextStyles.link("https://tina.io/docs/tinacloud/")}`
|
|
709
711
|
);
|
|
710
712
|
}
|
|
711
|
-
run()
|
|
713
|
+
run().catch((error) => {
|
|
714
|
+
console.error("Error running create-tina-app:", error);
|
|
715
|
+
process.exit(1);
|
|
716
|
+
});
|
|
712
717
|
// Annotate the CommonJS export names for ESM import in node:
|
|
713
718
|
0 && (module.exports = {
|
|
714
719
|
run
|