【发布时间】:2019-07-31 08:50:26
【问题描述】:
我需要 gulp 模块,例如 vscode 扩展,它可以自动对 .sass 文件中的属性进行排序。
我知道 sort-sass npm 模块,但我不能自动化它(它在 CLI 中工作,所以我尝试从 gulp-exec 模块运行它)
需要从这个:
text-decoration: none
margin: 0 auto
justify-content: space-between
text-transform: uppercase
width: 500px
align-items: center
color: black
padding: 100px
background-color: white
z-index: 5
height: 100px
display: flex
到这里:
display: flex
justify-content: space-between
align-items: center
height: 100px
width: 500px
padding: 100px
margin: 0 auto
background-color: white
color: black
text-decoration: none
text-transform: uppercase
z-index: 5
(贴个人喜好,没必要这样)
现在我正在使用带有自动修复功能的 stylelint,这很酷。
【问题讨论】: