@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.
Files changed (2) hide show
  1. package/dist/cli/index.mjs +23 -7
  2. package/package.json +1 -1
@@ -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
- const framework = detectFramework(cwd);
716
- if (!framework) {
717
- p.log.error("Could not detect a supported framework.\n Make sure you have a " + pc.cyan("package.json") + " with " + pc.cyan("next") + " or " + pc.cyan("@sveltejs/kit") + " installed.\n Supported frameworks: Next.js, SvelteKit");
718
- p.outro(pc.red("Init cancelled."));
719
- process.exit(1);
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/docs",
3
- "version": "0.0.2-beta.4",
3
+ "version": "0.0.2-beta.5",
4
4
  "description": "Modern, flexible MDX-based docs framework — core types, config, and CLI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",