@@ -224,7 +224,7 @@ var bankai = require('bankai/http')
224224var http = require (' http' )
225225var path = require (' path' )
226226
227- var compiler = bankai (path .join (__dirname , ' example ' ))
227+ var compiler = bankai (path .join (__dirname , ' client.js ' ))
228228var server = http .createServer (function (req , res ) {
229229 compiler (req, res, function () {
230230 res .statusCode = 404
@@ -270,29 +270,34 @@ Whenever a change in the internal graph occurs.
270270
271271## API
272272### ` compiler = bankai(entry, [opts]) `
273- Create a new bankai instance. Takes either an entry file location, or an array
274- of files.
273+ Create a new bankai instance. Takes a path to a JavaScript file as the first
274+ argument. The following options are available:
275275
276- ### ` compiler.documents(routename, [opts], done(err, buffer)) `
276+ - __ opts.quiet:__ Defaults to ` false ` . Don't output any data to ` stdout ` . Useful
277+ if you have your own logging system.
278+ - __ opts.watch:__ Defaults to ` true ` . Watch for changes in the source files and
279+ rebuild. Set to ` false ` to get optimized bundles.
280+
281+ ### ` compiler.documents(routename, [opts], done(err, { buffer, hash })) `
277282Output an HTML bundle for a route. Routes are determined based on the project's
278283router. Pass ` '/' ` to get the default route.
279284
280285- __ opts.state:__ Will be passed the render function for the route, and inlined
281286 in the ` <head> ` of the body as ` window.initialState ` .
282287
283- ### ` compiler.scripts(filename, done(err, buffer)) `
288+ ### ` compiler.scripts(filename, done(err, { buffer, hash } )) `
284289Pass in a filename and output a JS bundle.
285290
286- ### ` compiler.assets(assetName, done(err, buffer)) `
291+ ### ` compiler.assets(assetName, done(err, { buffer, hash } )) `
287292Output any other file besides JS, CSS or HTML.
288293
289- ### ` compiler.styles(name, done(err, buffer)) `
294+ ### ` compiler.styles(name, done(err, { buffer, hash } )) `
290295Output a CSS bundle.
291296
292- ### ` compiler.manifest(done(err, buffer)) `
297+ ### ` compiler.manifest(done(err, { buffer, hash } )) `
293298Output a ` manifest.json ` .
294299
295- ### ` compiler.serviceWorker(done(err, buffer)) `
300+ ### ` compiler.serviceWorker(done(err, { buffer, hash } )) `
296301Output a service worker.
297302
298303### ` compiler.close() `
0 commit comments