flarecms 0.2.3 → 0.2.4
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/commands.js +19 -2
- package/dist/cli/index.js +19 -2
- package/package.json +1 -1
package/dist/cli/commands.js
CHANGED
|
@@ -6506,8 +6506,25 @@ async function createProjectCommand() {
|
|
|
6506
6506
|
};
|
|
6507
6507
|
mkdirSync(resolve(projectDir, "plugins"), { recursive: true });
|
|
6508
6508
|
mkdirSync(resolve(projectDir, "apps"), { recursive: true });
|
|
6509
|
-
|
|
6510
|
-
|
|
6509
|
+
const localPluginPath = resolve(localTemplatesRoot, "plugin-development", "starter-plugin");
|
|
6510
|
+
const localPlaygroundPath = resolve(localTemplatesRoot, "plugin-development", "starter-playground");
|
|
6511
|
+
if (existsSync2(localPluginPath) && existsSync2(localPlaygroundPath)) {
|
|
6512
|
+
cpSync(localPluginPath, resolve(projectDir, "plugins", "starter-plugin"), { recursive: true });
|
|
6513
|
+
cpSync(localPlaygroundPath, resolve(projectDir, "apps", "playground"), { recursive: true });
|
|
6514
|
+
} else {
|
|
6515
|
+
try {
|
|
6516
|
+
await downloadTemplate("github:fhorray/flarecms/templates/plugin-development/starter-plugin", {
|
|
6517
|
+
dir: resolve(projectDir, "plugins/starter-plugin"),
|
|
6518
|
+
force: true
|
|
6519
|
+
});
|
|
6520
|
+
await downloadTemplate("github:fhorray/flarecms/templates/plugin-development/starter-playground", {
|
|
6521
|
+
dir: resolve(projectDir, "apps/playground"),
|
|
6522
|
+
force: true
|
|
6523
|
+
});
|
|
6524
|
+
} catch (err) {
|
|
6525
|
+
throw new Error(`Failed to download plugin templates: ${err instanceof Error ? err.message : String(err)}`);
|
|
6526
|
+
}
|
|
6527
|
+
}
|
|
6511
6528
|
writeFileSync(pkgPath, JSON.stringify(rootPkg, null, 2));
|
|
6512
6529
|
} else {
|
|
6513
6530
|
const template = TEMPLATES[templateKey];
|
package/dist/cli/index.js
CHANGED
|
@@ -6507,8 +6507,25 @@ async function createProjectCommand() {
|
|
|
6507
6507
|
};
|
|
6508
6508
|
mkdirSync(resolve(projectDir, "plugins"), { recursive: true });
|
|
6509
6509
|
mkdirSync(resolve(projectDir, "apps"), { recursive: true });
|
|
6510
|
-
|
|
6511
|
-
|
|
6510
|
+
const localPluginPath = resolve(localTemplatesRoot, "plugin-development", "starter-plugin");
|
|
6511
|
+
const localPlaygroundPath = resolve(localTemplatesRoot, "plugin-development", "starter-playground");
|
|
6512
|
+
if (existsSync2(localPluginPath) && existsSync2(localPlaygroundPath)) {
|
|
6513
|
+
cpSync(localPluginPath, resolve(projectDir, "plugins", "starter-plugin"), { recursive: true });
|
|
6514
|
+
cpSync(localPlaygroundPath, resolve(projectDir, "apps", "playground"), { recursive: true });
|
|
6515
|
+
} else {
|
|
6516
|
+
try {
|
|
6517
|
+
await downloadTemplate("github:fhorray/flarecms/templates/plugin-development/starter-plugin", {
|
|
6518
|
+
dir: resolve(projectDir, "plugins/starter-plugin"),
|
|
6519
|
+
force: true
|
|
6520
|
+
});
|
|
6521
|
+
await downloadTemplate("github:fhorray/flarecms/templates/plugin-development/starter-playground", {
|
|
6522
|
+
dir: resolve(projectDir, "apps/playground"),
|
|
6523
|
+
force: true
|
|
6524
|
+
});
|
|
6525
|
+
} catch (err) {
|
|
6526
|
+
throw new Error(`Failed to download plugin templates: ${err instanceof Error ? err.message : String(err)}`);
|
|
6527
|
+
}
|
|
6528
|
+
}
|
|
6512
6529
|
writeFileSync(pkgPath, JSON.stringify(rootPkg, null, 2));
|
|
6513
6530
|
} else {
|
|
6514
6531
|
const template = TEMPLATES[templateKey];
|