可以使用 watch 命令监听 scss 变化,并自动编译
sass --watch test.scss test.css
语法 sass test.scss test.css
格式 :
@charset "UTF-8";
/* 定义变量与值 */
/* 使用变量 */
.test-box {
background-color: lightblue;
color: darkblue;
font-size: 16px;
width: 300px;
line-height: 50px;
}
语法 sass test.scss test.css --style compressed
编译后格式
.test-box{background-color:#add8e6;color:#00008b;font-size:16px;width:300px;line-height:50px}