简单的一个,但在任何地方都找不到答案!在我的Mac上安装SASS(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.
我缺少什么?
谢谢!
首先创建SASS的文件夹,然后在其中创建您的SASS文件。示例:
sass/styles.sass
在您的项目root文件夹中,打开控制台并键入命令:
sass --watch sass/styles.sass:css/styles.css
此命令将创建您的CSS文件夹和CSS文件。除了为您的.css
编译您的.sass内容。
最后,我放弃了上面尝试的sass
,并使用webpack
进行了解决方案。
我尝试过的另一种选择是使用node-sass
。
I solved running this command on your terminal
echo fs.inotify.max_user_watches = 524288 |sudo tee -a/etc/sysctl.conf&amp;&amp;sudo sysctl -p
我希望有帮助