Skip to content

Commit

Permalink
Merge pull request #1430 from xzyfer/feat/process-sass-deprecation-wa…
Browse files Browse the repository at this point in the history
…rning

Ouptut a deprecation warning to stdout when using process.sass
  • Loading branch information
xzyfer committed Mar 26, 2016
2 parents d76923b + adb6166 commit 7c24716
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/index.js
Expand Up @@ -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; },
};

0 comments on commit 7c24716

Please sign in to comment.