@webmate-studio/builder 0.1.3 → 0.1.4
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/package.json
CHANGED
|
@@ -16,8 +16,26 @@ const execAsync = promisify(exec);
|
|
|
16
16
|
const __filename = fileURLToPath(import.meta.url);
|
|
17
17
|
const __dirname = dirname(__filename);
|
|
18
18
|
|
|
19
|
-
// Find tailwindcss binary
|
|
20
|
-
|
|
19
|
+
// Find tailwindcss binary - try multiple locations
|
|
20
|
+
import { createRequire } from 'module';
|
|
21
|
+
const require = createRequire(import.meta.url);
|
|
22
|
+
|
|
23
|
+
let tailwindBinary;
|
|
24
|
+
try {
|
|
25
|
+
// Try to resolve tailwindcss package
|
|
26
|
+
const tailwindPackagePath = require.resolve('tailwindcss/package.json');
|
|
27
|
+
const tailwindDir = dirname(tailwindPackagePath);
|
|
28
|
+
|
|
29
|
+
// Check if we're on Windows
|
|
30
|
+
const isWindows = process.platform === 'win32';
|
|
31
|
+
const binName = isWindows ? 'tailwindcss.cmd' : 'tailwindcss';
|
|
32
|
+
|
|
33
|
+
// Use npx to run tailwindcss from the resolved package
|
|
34
|
+
tailwindBinary = `npx tailwindcss`;
|
|
35
|
+
} catch (e) {
|
|
36
|
+
// Fallback to old method
|
|
37
|
+
tailwindBinary = join(__dirname, '..', 'node_modules', '.bin', 'tailwindcss');
|
|
38
|
+
}
|
|
21
39
|
|
|
22
40
|
/**
|
|
23
41
|
* Extract Tailwind classes from HTML content
|
|
@@ -16,8 +16,26 @@ const execAsync = promisify(exec);
|
|
|
16
16
|
const __filename = fileURLToPath(import.meta.url);
|
|
17
17
|
const __dirname = dirname(__filename);
|
|
18
18
|
|
|
19
|
-
// Find tailwindcss binary
|
|
20
|
-
|
|
19
|
+
// Find tailwindcss binary - try multiple locations
|
|
20
|
+
import { createRequire } from 'module';
|
|
21
|
+
const require = createRequire(import.meta.url);
|
|
22
|
+
|
|
23
|
+
let tailwindBinary;
|
|
24
|
+
try {
|
|
25
|
+
// Try to resolve tailwindcss package
|
|
26
|
+
const tailwindPackagePath = require.resolve('tailwindcss/package.json');
|
|
27
|
+
const tailwindDir = dirname(tailwindPackagePath);
|
|
28
|
+
|
|
29
|
+
// Check if we're on Windows
|
|
30
|
+
const isWindows = process.platform === 'win32';
|
|
31
|
+
const binName = isWindows ? 'tailwindcss.cmd' : 'tailwindcss';
|
|
32
|
+
|
|
33
|
+
// Use npx to run tailwindcss from the resolved package
|
|
34
|
+
tailwindBinary = `npx tailwindcss`;
|
|
35
|
+
} catch (e) {
|
|
36
|
+
// Fallback to old method
|
|
37
|
+
tailwindBinary = join(__dirname, '..', 'node_modules', '.bin', 'tailwindcss');
|
|
38
|
+
}
|
|
21
39
|
|
|
22
40
|
/**
|
|
23
41
|
* Extract Tailwind classes from HTML content
|