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;
* 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 || {
versionInfo: module.exports.info,
binaryName: sass.getBinaryName(),
binaryUrl: sass.getBinaryUrl(),
binaryPath: sass.getBinaryPath(),
getBinaryPath: sass.getBinaryPath,
get versionInfo() { processSassDeprecationMessage(); return module.exports.info; },
get binaryName() { processSassDeprecationMessage(); return sass.getBinaryName(); },
get binaryUrl() { processSassDeprecationMessage(); return sass.getBinaryUrl(); },
get binaryPath() { processSassDeprecationMessage(); return 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