scss-variable-extractor 1.5.1 → 1.5.2
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 +14 -2
- package/bin/cli.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -342,7 +342,8 @@ npx scss-extract migrate-bootstrap ./src --custom-utilities ./src/utilities.scss
|
|
|
342
342
|
- `[src]` - Source directory to scan (optional, auto-detected from angular.json)
|
|
343
343
|
|
|
344
344
|
**Options:**
|
|
345
|
-
- `--custom-utilities <path>` - Path for custom utilities file (default: `./src/utilities.scss`)
|
|
345
|
+
- `--custom-utilities <path>` - Path for custom utilities file (default: `./src/styles/utilities.scss`)
|
|
346
|
+
- `--no-custom-utilities` - Skip creating custom utility classes
|
|
346
347
|
- `--dry-run` - Preview changes without modifying files
|
|
347
348
|
- `--angular-json <path>` - Path to angular.json file
|
|
348
349
|
- `--project <name>` - Specify which project to use
|
|
@@ -408,7 +409,13 @@ npx scss-extract migrate-bootstrap --dry-run
|
|
|
408
409
|
# 3. Apply migration
|
|
409
410
|
npx scss-extract migrate-bootstrap
|
|
410
411
|
|
|
411
|
-
# 4.
|
|
412
|
+
# 4. Apply migration with custom utilities path
|
|
413
|
+
npx scss-extract migrate-bootstrap --custom-utilities ./custom/utilities.scss
|
|
414
|
+
|
|
415
|
+
# 5. Skip utilities generation
|
|
416
|
+
npx scss-extract migrate-bootstrap --no-custom-utilities
|
|
417
|
+
|
|
418
|
+
# 6. Review changes and test components
|
|
412
419
|
# Manual review of generated utilities.scss and component templates
|
|
413
420
|
```
|
|
414
421
|
|
|
@@ -701,6 +708,11 @@ MIT License - see [LICENSE](./LICENSE) file for details
|
|
|
701
708
|
|
|
702
709
|
## Changelog
|
|
703
710
|
|
|
711
|
+
### 1.5.2 (2026-02-12)
|
|
712
|
+
|
|
713
|
+
- **Fixed:** `migrate-bootstrap` command option renamed from `--utilities` to `--custom-utilities` to work with `--no-custom-utilities`
|
|
714
|
+
- **Fixed:** Default utilities path corrected to `./src/styles/utilities.scss`
|
|
715
|
+
|
|
704
716
|
### 1.5.1 (2026-02-12)
|
|
705
717
|
|
|
706
718
|
- **Enhanced:** HTML class detection now handles spaces around `=` (e.g., `class = "py-3"`)
|
package/bin/cli.js
CHANGED
|
@@ -481,7 +481,7 @@ program
|
|
|
481
481
|
.command('migrate-bootstrap')
|
|
482
482
|
.description('Migrate Bootstrap classes to Angular Material MDC-based styles')
|
|
483
483
|
.argument('[src]', 'Source directory to scan (optional if using angular.json)')
|
|
484
|
-
.option('--utilities <path>', 'Path to custom utilities file', './src/styles/utilities.scss')
|
|
484
|
+
.option('--custom-utilities <path>', 'Path to custom utilities file', './src/styles/utilities.scss')
|
|
485
485
|
.option('--no-custom-utilities', 'Skip creating custom utility classes')
|
|
486
486
|
.option('--no-remove-imports', 'Keep Bootstrap imports')
|
|
487
487
|
.option('--dry-run', 'Preview changes without modifying files')
|
|
@@ -512,7 +512,7 @@ program
|
|
|
512
512
|
}
|
|
513
513
|
|
|
514
514
|
console.log(chalk.gray(`Scanning: ${config.src}`));
|
|
515
|
-
console.log(chalk.gray(`Utilities output: ${options.utilities}\n`));
|
|
515
|
+
console.log(chalk.gray(`Utilities output: ${options.customUtilities || './src/styles/utilities.scss'}\n`));
|
|
516
516
|
|
|
517
517
|
// Scan files - look for SCSS, HTML, and TS files
|
|
518
518
|
const allFiles = await scanTemplateFiles(config.src, config.ignore);
|
|
@@ -521,7 +521,7 @@ program
|
|
|
521
521
|
// Migrate Bootstrap
|
|
522
522
|
const results = migrateBootstrapToMaterial(allFiles, {
|
|
523
523
|
createCustomUtilities: options.customUtilities !== false,
|
|
524
|
-
customUtilitiesPath: options.utilities,
|
|
524
|
+
customUtilitiesPath: options.customUtilities || './src/styles/utilities.scss',
|
|
525
525
|
removeBootstrapImports: options.removeImports !== false,
|
|
526
526
|
dryRun: options.dryRun
|
|
527
527
|
});
|
|
@@ -545,7 +545,7 @@ program
|
|
|
545
545
|
}
|
|
546
546
|
|
|
547
547
|
if (results.customUtilities.length > 0) {
|
|
548
|
-
console.log(chalk.cyan(`✓ Generated ${results.customUtilities.length} custom utility class(es) in ${options.utilities}\n`));
|
|
548
|
+
console.log(chalk.cyan(`✓ Generated ${results.customUtilities.length} custom utility class(es) in ${options.customUtilities || './src/styles/utilities.scss'}\n`));
|
|
549
549
|
}
|
|
550
550
|
|
|
551
551
|
if (results.componentMigrations.length > 0) {
|