vectorvesper 0.3.0 → 0.3.2

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/index.js +17 -14
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -59,17 +59,6 @@ function detectProject(cwd = process.cwd()) {
59
59
  }
60
60
  const isTypeScript = fs.existsSync(path.join(rootPath, "tsconfig.json"));
61
61
  const hasSrcDir = fs.existsSync(path.join(rootPath, "src"));
62
- const tailwindConfigs = [
63
- "tailwind.config.js",
64
- "tailwind.config.ts",
65
- "tailwind.config.cjs",
66
- "tailwind.config.mjs"
67
- ];
68
- const hasTailwind = tailwindConfigs.some(
69
- (config) => fs.existsSync(path.join(rootPath, config))
70
- );
71
- let framework = "unknown";
72
- let nextRouter;
73
62
  const pkgPath = path.join(rootPath, "package.json");
74
63
  let dependencies = {};
75
64
  let devDependencies = {};
@@ -78,9 +67,23 @@ function detectProject(cwd = process.cwd()) {
78
67
  const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
79
68
  dependencies = pkg.dependencies || {};
80
69
  devDependencies = pkg.devDependencies || {};
81
- } catch (e) {
70
+ } catch {
82
71
  }
83
72
  }
73
+ const allDeps = { ...dependencies, ...devDependencies };
74
+ const tailwindConfigs = [
75
+ "tailwind.config.js",
76
+ "tailwind.config.ts",
77
+ "tailwind.config.cjs",
78
+ "tailwind.config.mjs"
79
+ ];
80
+ const hasTailwindConfig = tailwindConfigs.some(
81
+ (config) => fs.existsSync(path.join(rootPath, config))
82
+ );
83
+ const hasTailwindDep = "tailwindcss" in allDeps || "@tailwindcss/postcss" in allDeps || "@tailwindcss/vite" in allDeps;
84
+ const hasTailwind = hasTailwindConfig || hasTailwindDep;
85
+ let framework = "unknown";
86
+ let nextRouter;
84
87
  if (dependencies["next"] || devDependencies["next"]) {
85
88
  framework = "next";
86
89
  const searchPath = hasSrcDir ? path.join(rootPath, "src") : rootPath;
@@ -1302,7 +1305,7 @@ Remove ${slug}
1302
1305
  import fs9 from "fs";
1303
1306
  import path9 from "path";
1304
1307
  import pc9 from "picocolors";
1305
- var CLI_VERSION = true ? "0.3.0" : "0.0.0-dev";
1308
+ var CLI_VERSION = true ? "0.3.2" : "0.0.0-dev";
1306
1309
  async function infoCommand() {
1307
1310
  console.log(pc9.bold(pc9.cyan("\nVector Vesper Diagnostics\n")));
1308
1311
  const projectInfo = detectProject();
@@ -1600,7 +1603,7 @@ async function whoamiCommand() {
1600
1603
  }
1601
1604
 
1602
1605
  // src/index.ts
1603
- var version = true ? "0.3.0" : "0.0.0-dev";
1606
+ var version = true ? "0.3.2" : "0.0.0-dev";
1604
1607
  var program = new Command();
1605
1608
  program.name("vv").description("Vector Vesper CLI \u2014 add visual components to your React project").version(version).option("--verbose", "Show detailed debug output").hook("preAction", (thisCommand) => {
1606
1609
  const opts = thisCommand.opts();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vectorvesper",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Add WebGL, React Three Fiber & advanced motion components to your project via CLI — motion, engineered.",
5
5
  "type": "module",
6
6
  "license": "MIT",