Created
June 6, 2014 00:29
-
-
Save matthewrobb/effc9c1b8b766e33d131 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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