@farming-labs/docs 0.0.2-beta.4 → 0.0.2-beta.5
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/index.mjs +23 -7
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -712,14 +712,30 @@ Deploy to Vercel, Netlify, or any Node.js hosting platform.
|
|
|
712
712
|
async function init() {
|
|
713
713
|
const cwd = process.cwd();
|
|
714
714
|
p.intro(pc.bgCyan(pc.black(" @farming-labs/docs ")));
|
|
715
|
-
|
|
716
|
-
if (
|
|
717
|
-
|
|
718
|
-
p.
|
|
719
|
-
|
|
715
|
+
let framework = detectFramework(cwd);
|
|
716
|
+
if (framework) {
|
|
717
|
+
const frameworkName = framework === "nextjs" ? "Next.js" : "SvelteKit";
|
|
718
|
+
p.log.success(`Detected framework: ${pc.cyan(frameworkName)}`);
|
|
719
|
+
} else {
|
|
720
|
+
p.log.warn("Could not auto-detect a framework from " + pc.cyan("package.json") + ".");
|
|
721
|
+
const picked = await p.select({
|
|
722
|
+
message: "Which framework are you using?",
|
|
723
|
+
options: [{
|
|
724
|
+
value: "nextjs",
|
|
725
|
+
label: "Next.js",
|
|
726
|
+
hint: "React framework with App Router"
|
|
727
|
+
}, {
|
|
728
|
+
value: "sveltekit",
|
|
729
|
+
label: "SvelteKit",
|
|
730
|
+
hint: "Svelte framework with file-based routing"
|
|
731
|
+
}]
|
|
732
|
+
});
|
|
733
|
+
if (p.isCancel(picked)) {
|
|
734
|
+
p.outro(pc.red("Init cancelled."));
|
|
735
|
+
process.exit(0);
|
|
736
|
+
}
|
|
737
|
+
framework = picked;
|
|
720
738
|
}
|
|
721
|
-
const frameworkName = framework === "nextjs" ? "Next.js" : "SvelteKit";
|
|
722
|
-
p.log.success(`Detected framework: ${pc.cyan(frameworkName)}`);
|
|
723
739
|
const themeOptions = framework === "sveltekit" ? [{
|
|
724
740
|
value: "default",
|
|
725
741
|
label: "Default",
|