Created
January 23, 2015 16:28
-
-
Save wspringer/5f404813fc9a306b8c80 to your computer and use it in GitHub Desktop.
Bower support for Metalsmith
This file contains hidden or 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
bower = (files, metalsmith, done) -> | |
include = (root, included) -> | |
for file in included | |
contents = readFileSync(file) | |
files["#{root}/#{basename(file)}"] = | |
contents: contents | |
include('css', lib.self().ext('css').files) | |
include('js', lib.self().ext('js').files) | |
include('fonts', lib.self().ext(['eot','otf','ttf','woff']).files) | |
done() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment