@0xgf/boneyard 1.1.0 → 1.2.1
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/bin/boneyard.mjs +4 -4
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/package.json +1 -1
package/bin/boneyard.mjs
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* npm install -D playwright && npx playwright install chromium
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
import { writeFileSync, mkdirSync, existsSync } from 'fs'
|
|
23
|
+
import { writeFileSync, mkdirSync, existsSync, readFileSync } from 'fs'
|
|
24
24
|
import { resolve, join } from 'path'
|
|
25
25
|
import http from 'http'
|
|
26
26
|
import https from 'https'
|
|
@@ -63,7 +63,7 @@ for (let i = 1; i < args.length; i++) {
|
|
|
63
63
|
/** Tailwind v4 default breakpoints */
|
|
64
64
|
const TAILWIND_DEFAULTS = [640, 768, 1024, 1280, 1536]
|
|
65
65
|
|
|
66
|
-
function detectTailwindBreakpoints() {
|
|
66
|
+
async function detectTailwindBreakpoints() {
|
|
67
67
|
// Check for Tailwind v4 (CSS-based config)
|
|
68
68
|
const cssConfigPaths = [
|
|
69
69
|
'src/app/globals.css',
|
|
@@ -78,7 +78,7 @@ function detectTailwindBreakpoints() {
|
|
|
78
78
|
const full = resolve(process.cwd(), p)
|
|
79
79
|
if (!existsSync(full)) continue
|
|
80
80
|
try {
|
|
81
|
-
const css =
|
|
81
|
+
const css = readFileSync(full, 'utf-8')
|
|
82
82
|
if (css.includes('@import "tailwindcss"') || css.includes("@import 'tailwindcss'") || css.includes('@tailwind')) {
|
|
83
83
|
return TAILWIND_DEFAULTS
|
|
84
84
|
}
|
|
@@ -89,7 +89,7 @@ function detectTailwindBreakpoints() {
|
|
|
89
89
|
try {
|
|
90
90
|
const pkgPath = resolve(process.cwd(), 'package.json')
|
|
91
91
|
if (existsSync(pkgPath)) {
|
|
92
|
-
const pkg = JSON.parse(
|
|
92
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'))
|
|
93
93
|
const allDeps = { ...pkg.dependencies, ...pkg.devDependencies }
|
|
94
94
|
if (allDeps['tailwindcss']) return TAILWIND_DEFAULTS
|
|
95
95
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -30,8 +30,7 @@ export { fromElement } from './extract.js';
|
|
|
30
30
|
export { extractResponsive } from './responsive.js';
|
|
31
31
|
/**
|
|
32
32
|
* Compute skeleton bone positions from a descriptor at a given width.
|
|
33
|
-
*
|
|
34
|
-
* Ideal for SSR or workers where `snapshotBones` isn't available.
|
|
33
|
+
* No DOM needed — works in SSR, workers, and edge functions.
|
|
35
34
|
*/
|
|
36
35
|
export { computeLayout } from './layout.js';
|
|
37
36
|
/**
|
package/dist/index.js
CHANGED
|
@@ -32,8 +32,7 @@ export { fromElement } from './extract.js';
|
|
|
32
32
|
export { extractResponsive } from './responsive.js';
|
|
33
33
|
/**
|
|
34
34
|
* Compute skeleton bone positions from a descriptor at a given width.
|
|
35
|
-
*
|
|
36
|
-
* Ideal for SSR or workers where `snapshotBones` isn't available.
|
|
35
|
+
* No DOM needed — works in SSR, workers, and edge functions.
|
|
37
36
|
*/
|
|
38
37
|
export { computeLayout } from './layout.js';
|
|
39
38
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xgf/boneyard",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Pixel-perfect skeleton loading screens. Wrap your component in <Skeleton> and boneyard snapshots the real DOM layout — no manual descriptors, no configuration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|