0.12.3 • Published 10 years ago

wukong v0.12.3

Weekly downloads
9
License
MIT
Repository
-
Last release
10 years ago

Wukong 悟空Build Status](https://travis-ci.org/fundon/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();

APIs

File

{
  path: {String},
  mode: {Number}, // oct
  contents: {String},
  metadata: {Object},
  buffer: {Buffer}
  ...
}

Files

Before
[ 'wukong.js', 'reset.css', ... ]
After
[ File, File, ... ]

createFile()

Create a File instance.

use(*plugin, type)

Add a middleware for the file object.

type: before/after

build(*callback)

Start to build files.

run(file, files, *callback)

Run a set of file, files through the middleware stack

metadata(metadata)

Get/set metadata.

site(path)

Get/set site.

source(path)

Get/set source.

destination(path)

Get/set destination.

join(path...)

Join the current dir

Plugins

License

MIT

0.12.3

10 years ago

0.12.2

10 years ago

0.12.1

10 years ago

0.12.0

10 years ago

0.11.0

10 years ago

0.10.0

10 years ago

0.9.0

10 years ago

0.8.0

10 years ago

0.7.15

10 years ago

0.7.14

10 years ago

0.7.13

10 years ago

0.7.12

10 years ago

0.7.11

10 years ago

0.7.10

10 years ago

0.7.9

10 years ago

0.7.8

10 years ago

0.7.7

10 years ago

0.7.6

10 years ago

0.7.5

10 years ago

0.7.4

10 years ago

0.7.2

10 years ago

0.7.1

10 years ago

0.7.0

10 years ago

0.6.0

10 years ago

0.5.0

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.0

10 years ago