scss-variable-extractor 1.5.2 → 1.5.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.
- package/README.md +7 -0
- package/package.json +1 -1
- package/src/bootstrap-migrator.js +27 -0
package/README.md
CHANGED
|
@@ -708,6 +708,13 @@ MIT License - see [LICENSE](./LICENSE) file for details
|
|
|
708
708
|
|
|
709
709
|
## Changelog
|
|
710
710
|
|
|
711
|
+
### 1.5.3 (2026-02-12)
|
|
712
|
+
|
|
713
|
+
- **Fixed:** `migrate-bootstrap` now actually detects Bootstrap classes and generates utilities
|
|
714
|
+
- **Fixed:** Invalid CSS ("Manual migration required") no longer added to utilities.scss
|
|
715
|
+
- **Enhanced:** Utility classes are now properly added to customUtilitiesSet during migration
|
|
716
|
+
- **Improved:** Component migrations are tracked and reported
|
|
717
|
+
|
|
711
718
|
### 1.5.2 (2026-02-12)
|
|
712
719
|
|
|
713
720
|
- **Fixed:** `migrate-bootstrap` command option renamed from `--utilities` to `--custom-utilities` to work with `--no-custom-utilities`
|
package/package.json
CHANGED
|
@@ -418,6 +418,33 @@ function migrateFileBootstrap(content, filePath, options) {
|
|
|
418
418
|
let modified = false;
|
|
419
419
|
const { customUtilitiesSet, removeBootstrapImports } = options;
|
|
420
420
|
|
|
421
|
+
// Detect Bootstrap classes in this file first
|
|
422
|
+
const detected = detectBootstrapInFile(content, filePath);
|
|
423
|
+
|
|
424
|
+
// Add utility classes to the set for custom utilities generation
|
|
425
|
+
if (customUtilitiesSet && detected.classes.length > 0) {
|
|
426
|
+
detected.classes.forEach(classInfo => {
|
|
427
|
+
if (classInfo.type === 'utility' && classInfo.mapping.needsCustom) {
|
|
428
|
+
const className = classInfo.class;
|
|
429
|
+
const css = classInfo.mapping.custom;
|
|
430
|
+
// Only add valid CSS (not warnings like "Manual migration required")
|
|
431
|
+
if (css && !css.includes('Manual') && !css.includes('Use CSS Grid')) {
|
|
432
|
+
customUtilitiesSet.add(`.${className} { ${css} }`);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// Track component migrations
|
|
437
|
+
if (classInfo.type === 'component') {
|
|
438
|
+
componentMigrations.push({
|
|
439
|
+
class: classInfo.class,
|
|
440
|
+
material: classInfo.mapping.material,
|
|
441
|
+
line: classInfo.line,
|
|
442
|
+
file: filePath
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
|
|
421
448
|
// Remove Bootstrap imports
|
|
422
449
|
if (removeBootstrapImports) {
|
|
423
450
|
const bootstrapImportRegex = /@import\s+['"].*bootstrap.*['"];?\s*\n?/gi;
|