A CoffeeScript plugin for Metalsmith.
npm install metalsmith-coffee
var coffee = require('metalsmith-coffee')
Metalsmith(__dirname)
.use(coffee(options))
.build()
Use any or all of the following:
A function to filter source files. By default all files with a valid coffeescript extension (.coffee, .litcoffee, .coffee.md) are included.
A function that receives as argument a coffee-script source file matched by filter and that shoud return de compiled file destination filepath.
if preserveSources is a truthy value then the files matched by filter will also be in the build folder
Aditional options to the coffee-script compile method can also be passed in the options object.
check the coffee-script compiler documentation for details
$ npm test
MIT License, see LICENSE for details.
This metalsmith plugin is an adaptation of the Metalsmith LESS plugin by Cristopher Cliff