Skip to content

Instantly share code, notes, and snippets.

@wspringer
Created January 23, 2015 16:28
Show Gist options
  • Save wspringer/5f404813fc9a306b8c80 to your computer and use it in GitHub Desktop.
Save wspringer/5f404813fc9a306b8c80 to your computer and use it in GitHub Desktop.
Bower support for Metalsmith
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