@farming-labs/docs 0.0.26 → 0.0.27

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.
@@ -27,11 +27,6 @@ function detectPackageManagerFromLockfile(cwd) {
27
27
  if (fs.existsSync(path.join(cwd, "package-lock.json"))) return "npm";
28
28
  return null;
29
29
  }
30
- function detectPackageManager(cwd) {
31
- const detected = detectPackageManagerFromLockfile(cwd);
32
- if (detected) return detected;
33
- return "npm";
34
- }
35
30
  function installCommand(pm) {
36
31
  return pm === "yarn" ? "yarn add" : `${pm} add`;
37
32
  }
@@ -2100,10 +2095,10 @@ async function init(options = {}) {
2100
2095
  s.stop("Files scaffolded");
2101
2096
  if (written.length > 0) p.log.success(`Created ${written.length} file${written.length > 1 ? "s" : ""}:\n` + written.map((f) => ` ${pc.green("+")} ${f}`).join("\n"));
2102
2097
  if (skipped.length > 0) p.log.info(`Skipped ${skipped.length} existing file${skipped.length > 1 ? "s" : ""}:\n` + skipped.map((f) => ` ${pc.dim("-")} ${f}`).join("\n"));
2103
- let pm = detectPackageManager(cwd);
2104
- p.log.info(`Detected ${pc.cyan(pm)} as package manager`);
2098
+ let pm = detectPackageManagerFromLockfile(cwd);
2099
+ if (pm) p.log.info(`Detected ${pc.cyan(pm)} from lockfile`);
2105
2100
  const pmAnswerExisting = await p.select({
2106
- initialValue: pm,
2101
+ ...pm ? { initialValue: pm } : {},
2107
2102
  message: "Which package manager do you want to use in this project?",
2108
2103
  options: [
2109
2104
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/docs",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "Modern, flexible MDX-based docs framework — core types, config, and CLI",
5
5
  "keywords": [
6
6
  "docs",