@webmate-studio/builder 0.2.39 → 0.2.40
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 +1 -1
- package/src/build.js +4 -2
- package/src/tailwind-generator.js +6 -0
package/package.json
CHANGED
package/src/build.js
CHANGED
|
@@ -369,11 +369,13 @@ export async function build(options = {}) {
|
|
|
369
369
|
|
|
370
370
|
// Generate Tailwind CSS for this component
|
|
371
371
|
logger.info(`Generating Tailwind CSS for ${component.name}...`);
|
|
372
|
-
const
|
|
372
|
+
const tailwindOptions = {
|
|
373
373
|
minify: minify,
|
|
374
374
|
designTokens: options.designTokens, // Pass design tokens to Tailwind generator
|
|
375
375
|
includeBaseLayers: false // Only generate utilities, not base/theme/properties layers
|
|
376
|
-
}
|
|
376
|
+
};
|
|
377
|
+
console.log('[Build.js] CALLING generateComponentCSS with options:', JSON.stringify(tailwindOptions, null, 2));
|
|
378
|
+
const { css, classes } = await generateComponentCSS(allHTML, tailwindOptions);
|
|
377
379
|
|
|
378
380
|
// Write CSS file
|
|
379
381
|
const cssFile = file.replace(/\.html$/, '.tailwind.css');
|
|
@@ -146,6 +146,8 @@ function generateThemeCSS(colors, designTokens = null) {
|
|
|
146
146
|
* @returns {Promise<string>} Generated CSS
|
|
147
147
|
*/
|
|
148
148
|
export async function generateTailwindCSS(classes, options = {}) {
|
|
149
|
+
console.log('[Tailwind Generator] RECEIVED options:', JSON.stringify(options, null, 2));
|
|
150
|
+
|
|
149
151
|
const {
|
|
150
152
|
designTokens = null,
|
|
151
153
|
minify = true,
|
|
@@ -349,6 +351,8 @@ ${themeCSS}
|
|
|
349
351
|
* @returns {Promise<{css: string, classes: string[]}>} Generated CSS and extracted classes
|
|
350
352
|
*/
|
|
351
353
|
export async function generateComponentCSS(html, options = {}) {
|
|
354
|
+
console.log('[Component CSS] RECEIVED options:', JSON.stringify(options, null, 2));
|
|
355
|
+
|
|
352
356
|
// Extract classes from HTML
|
|
353
357
|
const classes = extractTailwindClasses(html);
|
|
354
358
|
|
|
@@ -359,6 +363,8 @@ export async function generateComponentCSS(html, options = {}) {
|
|
|
359
363
|
};
|
|
360
364
|
}
|
|
361
365
|
|
|
366
|
+
console.log('[Component CSS] PASSING options to generateTailwindCSS:', JSON.stringify(options, null, 2));
|
|
367
|
+
|
|
362
368
|
// Generate CSS
|
|
363
369
|
const css = await generateTailwindCSS(classes, options);
|
|
364
370
|
|