1.0.7 • Published 7 years ago

bikeshed-js v1.0.7

Weekly downloads
18
License
ISC
Repository
github
Last release
7 years ago

This package runs bikeshed from node.js.

Uses the online service if bikeshed is not locally installed.

var bikeshed = require('bikeshed');
bikeshed().then(
  file => console.log('Output: ' + file),
  err => console.log(err));

or from gulp:

var bikeshed = require('bikeshed');

gulp.task("bikeshed", function () {
  return bikeshed('Overview.bs');
});

gulp.task("watch", function () {
  gulp.watch("*.bs", function (event) {
    bikeshed(event.path);
  });
});

Install

npm install bikeshed-js

or from github:

npm install kojiishi/bikeshed-js

Reference

function bikeshed(infile, outfile)

Returns a Promise that resolves on the completion with the output file path.

The infile specifies the bikeshed source file path.

The outfile specifies the output file path. If omitted, the extension of infile is replaced with '.html'.

If outfile is an array, the output chunks are appended to the array as Buffer. In this case, the Promise resolves to the array.

bikeshed('test.bs', []).then(buffers =>
  Buffer.concat(buffers).toString('utf8'));
1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago