a zip code crypto-currency system good for red ONLY

ModulesInRootPlugin.js 640B

1234567891011121314151617181920212223
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. function ModulesInRootPlugin(source, path, target) {
  6. this.source = source;
  7. this.path = path;
  8. this.target = target;
  9. }
  10. module.exports = ModulesInRootPlugin;
  11. ModulesInRootPlugin.prototype.apply = function(resolver) {
  12. var target = this.target;
  13. var path = this.path;
  14. resolver.plugin(this.source, function(request, callback) {
  15. var obj = Object.assign({}, request, {
  16. path: path,
  17. request: "./" + request.request
  18. });
  19. resolver.doResolve(target, obj, "looking for modules in " + path, callback, true);
  20. });
  21. };