【file watchers小工具】webstorm配置scss/sass自动转换成css代码及scss的使用命令

​​​​​​webstorm配置scss/sass自动转换成css代码及scss的使用命令_艾小逗-CSDN博客

使用Sass命令执行输出css文件【参数请查看官网】

1、【某些参数已失效,请查看最新的参数】

2、使用file watchers工具时,必须改变scss文件才会自动生成css文件

安装Sass | Sass中文网

// 参考scss的版本来配置对应的参数【sass  --help】
scss index.scss index.css --no-source-map

当前Sass版本为【1.71.1 compiled with dart2js 3.3.0】

sass --help

Usage: sass <input.scss> [output.css]
       sass <input.scss>:<output.css> <input/>:<output/> <dir/>

━━━ Input and Output ━━━━━━━━━━━━━━━━━━━
    --[no-]stdin                   Read the stylesheet from stdin.
    --[no-]indented                Use the indented syntax for input from stdin.
-I, --load-path=<PATH>             A path to use when resolving imports.
                                   May be passed multiple times.
-p, --pkg-importer=<TYPE>          Built-in importer(s) to use for pkg: URLs.

          [node]                   Load files like Node.js package resolution.

-s, --style=<NAME>                 Output style.
                                   [expanded (default), compressed]
    --[no-]charset                 Emit a @charset or BOM for CSS with non-ASCII characters.
                                   (defaults to on)
    --[no-]error-css               When an error occurs, emit a stylesheet describing it.
                                   Defaults to true when compiling to a file.
    --update                       Only compile out-of-date stylesheets.

━━━ Source Maps ━━━━━━━━━━━━━━━━━━━━━━━━
    --[no-]source-map              Whether to generate source maps.
                                   (defaults to on)
    --source-map-urls              How to link from source maps to source files.
                                   [relative (default), absolute]
    --[no-]embed-sources           Embed source file contents in source maps.
    --[no-]embed-source-map        Embed source map contents in CSS.

━━━ Warnings ━━━━━━━━━━━━━━━━━━━━━━━━━━━
-q, --[no-]quiet                   Don't print warnings.
    --[no-]quiet-deps              Don't print compiler warnings from dependencies.
                                   Stylesheets imported through load paths count as dependencies.
    --[no-]verbose                 Print all deprecation warnings even when they're repetitive.
    --fatal-deprecation            Deprecations to treat as errors. You may also pass a Sass
                                   version to include any behavior deprecated in or before it.
                                   See https://sass-lang.com/documentation/breaking-changes for 
                                   a complete list.

          [abs-percent]            Passing percentages to the Sass abs() function.
          [bogus-combinators]      Leading, trailing, and repeated combinators.
          [call-string]            Passing a string directly to meta.call().
          [color-module-compat]    Using color module functions in place of plain CSS functions.
          [duplicate-var-flags]    Using !default or !global multiple times for one variable.
          [elseif]                 @elseif.
          [function-units]         Passing invalid units to built-in functions.
          [moz-document]           @-moz-document.
          [new-global]             Declaring new variables with !global.
          [null-alpha]             Passing null as alpha in the JS API.
          [slash-div]              / operator for division.
          [strict-unary]           Ambiguous + and - operators.

    --future-deprecation           Opt in to a deprecation early.

          [import]                 @import rules.

━━━ Other ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-w, --watch                        Watch stylesheets and recompile when they change.
    --[no-]poll                    Manually check for changes rather than using a native watcher.
                                   Only valid with --watch.
    --[no-]stop-on-error           Don't compile more files once an error is encountered.
-i, --interactive                  Run an interactive SassScript shell.
-c, --[no-]color                   Whether to use terminal colors for messages.
    --[no-]unicode                 Whether to use Unicode characters for messages.
    --[no-]trace                   Print full Dart stack traces for exceptions.
-h, --help                         Print this usage information.
    --version                      Print the version of Dart Sass.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值