yao

0.0.1 • Public • Published

Compatible to all gulp plugins.

Installaction

$ npm install -g yao
var jshint = require('gulp-jshint');

module.exports = function *(Yao) {
  var yao = Yao.create('yao');

  yao.task('lint', function *() {
    yao.interrupt('lint', this);
    return yao.src(['lib/**/*.js'])
      .pipe(jshint('.jshintrc'))
      .pipe(jshint.reporter('default'));
  });

  yao.task('watch-js', function *() {
    yield yao.run('lint');
    yao.watch('lib/**/*.js', ['lint']);
  });

  yao.task('default', ['lint']);
  yao.task('watch', ['watch-js']);

  return yao;
};

API

.task(name, GeneratorFuntion)

.parallel(taskNames)

.series(taskNames)

.run(taskNames, series)

.interrupt(taskName [, taskName...] [, currentTask] [, deep])

.mount(yao)

Example

Mount other yaofile

Command line

$ yao -m yaofiles/*.js

JS API

// ...
return function (Yao) {
  var yao = Yao.create('main');
  var yaofile2 = require('./yaofiles/example');
  var yao2 = yield yaofile2(Yao);
  yao.mount(yao2);
};
// ...

Readme

Keywords

none

Package Sidebar

Install

npm i yao

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • poying