UNPKG

388 BJavaScriptView Raw
1/*!
2 * node-sass: lib/binding.js
3 */
4
5var errors = require('./errors');
6
7/**
8 * Require binding
9 */
10module.exports = function(ext) {
11 if (!ext.hasBinary(ext.getBinaryPath())) {
12 if (!ext.isSupportedEnvironment()) {
13 throw new Error(errors.unsupportedEnvironment());
14 } else {
15 throw new Error(errors.missingBinary());
16 }
17 }
18
19 return require(ext.getBinaryPath());
20};