'use strict'; var pkgName = 'nano-css'; module.exports = function warnOnMissingDependencies (addon, renderer, deps) { var missing = []; for (var i = 0; i < deps.length; i++) { var name = deps[i]; if (!renderer[name]) { missing.push(name); } } if (missing.length) { var str = 'Addon "' + addon + '" is missing the following dependencies:'; for (var j = 0; j < missing.length; j++) { str += '\n require("' + pkgName + '/addon/' + missing[j] + '").addon(nano);'; } throw new Error(str); } };