@kidecms/core 0.1.2 → 0.1.3

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.
@@ -70,7 +70,25 @@ export default function cmsIntegration(options) {
70
70
  const corePkgDir = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
71
71
  const adminDir = path.join(corePkgDir, "admin");
72
72
  const routesDir = path.join(corePkgDir, "routes");
73
- const twAnimateCssPath = path.join(corePkgDir, "node_modules", "tw-animate-css", "dist", "tw-animate.css");
73
+ // Find tw-animate-css pnpm may hoist it anywhere in the dep tree
74
+ const findTwAnimate = () => {
75
+ const candidates = [
76
+ path.join(corePkgDir, "node_modules", "tw-animate-css", "dist", "tw-animate.css"),
77
+ path.join(root, "node_modules", "tw-animate-css", "dist", "tw-animate.css"),
78
+ ];
79
+ // Walk up from corePkgDir
80
+ let dir = corePkgDir;
81
+ while (dir !== path.dirname(dir)) {
82
+ candidates.push(path.join(dir, "node_modules", "tw-animate-css", "dist", "tw-animate.css"));
83
+ dir = path.dirname(dir);
84
+ }
85
+ for (const candidate of candidates) {
86
+ if (existsSync(candidate))
87
+ return candidate;
88
+ }
89
+ return candidates[0];
90
+ };
91
+ const twAnimateCssPath = findTwAnimate();
74
92
  const userAdminCss = path.resolve(root, "src/styles/admin.css");
75
93
  const generatedDir = path.join(root, "node_modules", ".kide");
76
94
  mkdirSync(generatedDir, { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kidecms/core",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Code-first CMS framework built for Astro.",
5
5
  "author": "Matti Hernesniemi",
6
6
  "license": "MIT",