Conversation
|
Our company also would like to see this merged as it should allow for node 12 support with the node-sass dependency. |
|
@dlmanning can you please check & merge this PR? |
| }; | ||
|
|
||
| // eslint-disable-next-line global-require, import/no-extraneous-dependencies | ||
| const compiler = gulpSass.compiler || require('node-sass'); |
There was a problem hiding this comment.
Should not this be auto-detection?
let compiler = gulpSass.compiler;
if (!compiler) {
try {
compiler = require('node-sass');
} catch (e) {
try {
compiler = require('sass');
} catch (e) {
return cb(new PluginError(
PLUGIN_NAME,
"No compiler found!\nPlease install one of the npm packages: node-sass or sass, or set compiler in code:\n const sass = require('gulp-sass');\n sass.compiler = require('sass');\n"
));
}
}
}So that user don't need to set dart-sass by hand. For reference, webpack's sass-loader does this kind of auto-detection.
There was a problem hiding this comment.
That makes a lot of sense, however I'm not in a position to fix this at the moment.
I'll probably get to it somewhere next week (if nobody else has yet).
| npm install gulp-sass --save-dev | ||
| ``` | ||
| You must also install either `node-sass` or `sass`. |
There was a problem hiding this comment.
Thoughts on changing this to:
You can either choose
node-sassorsass:npm install gulp-sass sass --save-devor:
npm install gulp-sass node-sass --save-dev
This way, users can copy the one-liner they prefer?
There was a problem hiding this comment.
I think that makes sense. Perhaps we should also add some additional information on the differences?
|
Can I help with anything to speed this along? Without this change, we are blocked on Node 14. |
|
I've just found https://www.npmjs.com/package/gulp-dart-sass that can be used as a drop-in replacement. |
|
Thanks all, close this to focus efforts on #802 which is more rounded at this point in time. |
Closes #747.
Implementation of #747 for your convenience.
I'm technically in violation of the contributor guidelines by opening this PR without prior approval, but I need this functionality right now and I want to use my fork in the meantime.
I'm not sure how I should update the changelog, should I add a new version "heading"?