无法禁用SASS缓存

4

我无法防止/.sass-cache目录的创建。

我尝试通过运行以下命令来解决此问题:

sass --no-cache

然而,运行该命令没有任何作用。 当我打开帮助标志时,得到以下内容:

Miscellaneous:
    -i, --interactive                Run an interactive SassScript shell.
    -c, --check                      Just check syntax, don't evaluate.
        --precision NUMBER_OF_DIGITS How many digits of precision to use when outputting decimal numbers.
                                     Defaults to 5.
        --cache-location PATH        The path to save parsed Sass files. Defaults to .sass-cache.
    -C, --no-cache                   Don't cache parsed Sass files.
        --trace                      Show a full Ruby stack trace on error.
    -q, --quiet                      Silence warnings and status messages during compilation.

看到这个错误后,我尝试了sass -C, --no-cache,但是出现了以下错误:

OptionParser::InvalidOption: invalid option: -, 使用--trace选项进行回溯。

如何禁用创建./sass-cache文件夹?

1个回答

7

使用

sass -C

或者
sass --no-cache

但不能同时使用。

如果使用 config.rb,则需添加:

asset_cache_buster = :none 
cache = false

我在 Mac 上使用 Sass 命令,版本为 1.26.8,没有这样的缓存选项。 - basZero

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接