a zip code crypto-currency system good for red ONLY

FileKindPlugin.js 550B

1234567891011121314151617181920
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. function FileKindPlugin(source, target) {
  6. this.source = source;
  7. this.target = target;
  8. }
  9. module.exports = FileKindPlugin;
  10. FileKindPlugin.prototype.apply = function(resolver) {
  11. var target = this.target;
  12. resolver.plugin(this.source, function(request, callback) {
  13. if(request.directory) return callback();
  14. var obj = Object.assign({}, request);
  15. delete obj.directory;
  16. resolver.doResolve(target, obj, null, callback);
  17. });
  18. };