简单一点,但在网上找不到答案!在我的Mac上安装了sass globally (npm install -g sass
)。
这项工作如预期的那样:
sass style.scss style.css
然后我试着:
sass --watch style.scss:style.css
并得到:
Could not find an option named "watch".
Usage: sass <input> [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.
-s, --style=<NAME> Output style.
[expanded (default), compressed]
-c, --[no-]color Whether to emit terminal colors.
-q, --[no-]quiet Don't print warnings.
--[no-]trace Print full Dart stack traces for exceptions.
-h, --help Print this usage information.
--version Print the version of Dart Sass.
我遗漏了什么??
谢谢!!
发布于 2018-03-31 04:01:48
最后,我放弃了上面尝试过的sass
,转而使用webpack
解决方案。
我尝试过的另一个可行的选择是使用node-sass
。
发布于 2022-03-25 19:10:37
首先创建SASS的文件夹,然后在其中创建SASS的文件。示例:
sass/styles.sass
在项目根文件夹中,打开控制台并键入命令:
sass --watch sass/styles.sass:css/styles.css
此命令将创建CSS的文件夹和CSS的文件。除了为您的.sass编译.css
内容之外。
发布于 2018-03-28 22:45:48
I solved running this command on your terminal
echo fs.inotify.max_user_watches=524288 \ sudo tee -a /etc/sysctl.conf && sysctl -p
我希望你能帮上忙
https://stackoverflow.com/questions/49536528
复制相似问题