wukong

Next-gen for pluggable Static Site Generator, using generators via co and co-ware.

Wukong [悟空]

Next-gen for pluggable Static Site Generator, using generators via co and co-ware.

Koa and Metalsmith inspired.

In Wukong (likes in Metalsmith)

Wukong(__dirname)
  // files's middlewares 
  .use(function *(next) {
    tihs.files = this.files
      .filter(function (v) {
        return v === 'index';
      });
 
    yield next;
  }, 'before')
  // file's middlewares 
  .use(function *(next) {
    var file = this.file;
    file.contents = myth(file.contents);
    yield next;
  })
  .build();
{
  path: {String},
  mode: {Number}, // oct 
  contents: {String},
  metadata: {Object},
  buffer: {Buffer}
  ...
}
[ 'wukong.js', 'reset.css', ... ]
 
[ File, File, ... ]

Create a File instance.

Add a middleware for the file object.

type: before/after

Start to build files.

Run a set of file, files through the middleware stack

Get/set metadata.

Get/set site.

Get/set source.

Get/set destination.

Join the current dir

MIT