Commit adb6166b by xzyfer

Ouptut a deprecation warning to stdout when using process.sass

This is an undocumented internal API that will be removed. Access
`process.sass` will produce the following warning.

>Deprecation warning: `process.sass` is an undocumented internal
that will be removed in future versions of Node Sass.
parent d76923b4
...@@ -441,10 +441,14 @@ module.exports.NULL = binding.types.Null.NULL; ...@@ -441,10 +441,14 @@ module.exports.NULL = binding.types.Null.NULL;
* TODO: remove for 4.0 * TODO: remove for 4.0
*/ */
function processSassDeprecationMessage() {
console.log('Deprecation warning: `process.sass` is an undocumented internal that will be removed in future versions of Node Sass.');
}
process.sass = process.sass || { process.sass = process.sass || {
versionInfo: module.exports.info, get versionInfo() { processSassDeprecationMessage(); return module.exports.info; },
binaryName: sass.getBinaryName(), get binaryName() { processSassDeprecationMessage(); return sass.getBinaryName(); },
binaryUrl: sass.getBinaryUrl(), get binaryUrl() { processSassDeprecationMessage(); return sass.getBinaryUrl(); },
binaryPath: sass.getBinaryPath(), get binaryPath() { processSassDeprecationMessage(); return sass.getBinaryPath(); },
getBinaryPath: sass.getBinaryPath, get getBinaryPath() { processSassDeprecationMessage(); return sass.getBinaryPath; },
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment