Skip to content

Instantly share code, notes, and snippets.

@matthewrobb
Created June 6, 2014 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewrobb/effc9c1b8b766e33d131 to your computer and use it in GitHub Desktop.
Save matthewrobb/effc9c1b8b766e33d131 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="http://static.jsbin.com/js/vendor/traceur.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
</body>
</html>
class BowerConfig {
constructor(cfg) {
assign(this, cfg);
}
match(file) {
var { path, base } = file;
for(var [ id, info ] of this) {
if(path === id || minimatch(path, `**/${ id }.+(js|map)`)) {
file.path = join(base, basename(path));
return info;
}
}
}
*[ Symbol.iterator ]() {
var key, val;
for(key of keys(this)) {
val = this[key];
if(key !== Symbol.iterator) {
yield [ key, val ];
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment