@myndpm/stylus2scss
v0.2.13
Published
CLI utility to convert `styl` files to `scss`. It also updates Angular Components metadata.
Readme
@myndpm/stylus2scss
CLI utility to convert styl files to scss.
It also updates Angular Components metadata.
Usage
npx @myndpm/stylus2scss [--path <path>] [--git] [--dry-run]
[--diagnose]
[--convert] [--quote single|double] [--indent 2] [--autoprefixer] [--sign-comments]
[--move]
[--migrate]--path <path>Path to the directory for conversion. Default is current directory--gitConvert and move files keeping the GIT history--dry-runDo not execute and just print the steps--diagnoseOnly list and detect line endings on the existing stylesheets in the directory--convertOnly convert the stylus contents to the target language--quoteWhether to use single or double quotes. Default is single--indentAdditional indent, useful for Vue--autoprefixerEnable autoprefixed keyframes--commentsSafe conversion of inline comments
--moveOnly move the stylus files to SCSS and update the related TS file--migrateOnly run the sass-migration tool on the existing SCSS files
Examples
Only diagnose the given path listing the files to process:
npx @myndpm/stylus2scss --path relative/path/ --diagnose [--git]Only convert with some custom options:
npx @myndpm/stylus2scss --convert --quote double --autoprefixerOnly move the files and update the components but do not add the changes to git:
npx @myndpm/stylus2scss --moveOnly migrate the existing scss files:
npx @myndpm/stylus2scss --migratePrints the files and commands that will be executed:
npx @myndpm/stylus2scss --dry-run [--git]Perform all the conversion steps on the current folder and commits to git:
npx @myndpm/stylus2scss --gitTroubleshooting
Before you commit each step you can review the staged files in your IDE.
If the sass-migrator fails because the stylus file had a faulty conversion, you can re-run with the
--migrationonly option as many times as needed.The selector
&#idproduces a conversion error, you need to remove&and restore it later on.
Credits
Based on stylus-converter
TODO
- Block variable converted to invalid mixin
- Why
background-image: url('data:image/png;base64,gets modified? - Warn to review the output of
@each - Remove second parameter of
embedurl
