patrickarlt / acetate

A flexible, fast and easy to extend static site generator for Node
http://acetate.io
ISC License
20 stars 13 forks source link

Helper method to create a new output file #51

Closed patrickarlt closed 9 years ago

patrickarlt commented 9 years ago

This would be particularly helpful in cases like https://github.com/patrickarlt/acetate/issues/50 which could then be written like this:

// acetate.conf.js
module.exports = function(acetate){
  acetate.use(function(acetate, callback){
    acetate.output({
      dest: 'posts.json',
      raw: JSON.stringify(acetate.pages)
    });
  });
}

Will need to think about the API a little more.

patrickarlt commented 9 years ago

https://github.com/patrickarlt/acetate/blob/master/test/output-helper/acetate.conf.js