Last active
August 29, 2015 14:24
-
-
Save woodyrew/db19b2c648e693d4f881 to your computer and use it in GitHub Desktop.
Metalsmith Plugins
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
var Metalsmith = require('metalsmith'); | |
var plugin_name = function (options) { | |
return function (files, metalsmith, done) { | |
console.log(files); | |
console.log(metalsmith); | |
done(); | |
}; | |
}; | |
Metalsmith(__dirname) | |
.use(plugin_name({ | |
some: "options" | |
, to : "pass to the plugin" | |
})) | |
.destination('./build') | |
.build(function (err) { | |
// For error handling | |
if (err) { | |
throw err; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment