eleventy-plugin-sass
eleventy-plugin-sass copied to clipboard
update gulp-sass version
updating the gulp-sass version to 5.0.0 resolves errors that arise from the deprecated node-sass dependency
I got this error when installing your fork as a package; looks like one of the node-sass or sass packages may be required.
yarn run v1.22.4
$ eleventy
Writing public/index.html from ./src/index.html.
Copied 1 file / Wrote 1 file in 0.05 seconds (v0.12.1)
[Eleventy-Plugin-Sass] Compiling Sass files...
Error in plugin "gulp-sass"
Message:
gulp-sass 5 does not have a default Sass compiler; please set one yourself.
Both the `sass` and `node-sass` packages are permitted.
For example, in your gulpfile:
var sass = require('gulp-sass')(require('sass'));
error Command failed with exit code 1.
Repo for reproduction: https://github.com/geoffdavis92/test-eleventy-plugin-sass
@geoffdavis92 turns out another PR does precisely the same as @brooklynebkbk's here. Essentially it defines the newer version of gulp-sass. That error is addressed in the other PR since at the very top it immediately passes the desired compiler (i.e. sass in this case instead of the prior version's default dart-sass). i.e.
const sass = require('gulp-sass')(require('sass'));
~~I vote to close this out in favor of #27 with the caveat that @AnalyzePlatypus makes a minor tweak to the PR to incorporate sass as a dependency (and not as a devDependency, since otherwise I it won't appear in normal installations).~~ 😄
See below.
Actually my PR at #32 resolves the dependency problem above @geoffdavis92 and also allows you to override the compiler with a new compiler option in case you still want to use the older node-sass for some reason.