create-githat-app 1.2.0 → 1.2.1
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/cli.js +5 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -11,7 +11,7 @@ import gradient from "gradient-string";
|
|
|
11
11
|
import chalk from "chalk";
|
|
12
12
|
|
|
13
13
|
// src/constants.ts
|
|
14
|
-
var VERSION = "1.2.
|
|
14
|
+
var VERSION = "1.2.1";
|
|
15
15
|
var DEFAULT_API_URL = "https://api.githat.io";
|
|
16
16
|
var DASHBOARD_URL = "https://githat.io/dashboard/apps";
|
|
17
17
|
var BRAND_COLORS = ["#7c3aed", "#6366f1", "#8b5cf6"];
|
|
@@ -428,7 +428,7 @@ import path from "path";
|
|
|
428
428
|
import { fileURLToPath } from "url";
|
|
429
429
|
var __filename2 = fileURLToPath(import.meta.url);
|
|
430
430
|
var __dirname2 = path.dirname(__filename2);
|
|
431
|
-
var TEMPLATES_ROOT = path.resolve(__dirname2, "..", "
|
|
431
|
+
var TEMPLATES_ROOT = path.resolve(__dirname2, "..", "templates");
|
|
432
432
|
Handlebars.registerHelper("ifEquals", function(a, b, options) {
|
|
433
433
|
return a === b ? options.fn(this) : options.inverse(this);
|
|
434
434
|
});
|
|
@@ -578,9 +578,10 @@ async function scaffold(context, options) {
|
|
|
578
578
|
fs3.ensureDirSync(root);
|
|
579
579
|
const templatesRoot = getTemplatesRoot();
|
|
580
580
|
const frameworkDir = path3.join(templatesRoot, context.framework);
|
|
581
|
-
if (fs3.existsSync(frameworkDir)) {
|
|
582
|
-
|
|
581
|
+
if (!fs3.existsSync(frameworkDir)) {
|
|
582
|
+
throw new Error(`Templates not found at ${frameworkDir}. This is a bug \u2014 please report it.`);
|
|
583
583
|
}
|
|
584
|
+
renderTemplateDirectory(frameworkDir, root, context);
|
|
584
585
|
const baseDir = path3.join(templatesRoot, "base");
|
|
585
586
|
if (fs3.existsSync(baseDir)) {
|
|
586
587
|
renderTemplateDirectory(baseDir, root, context);
|