aster-watch

2019-09-13

Continuous source files reader for aster.

aster-watch

NPM versionBuild Status

Continuous source files reader for aster.

Usage

This module is part of asterand is available via aster.watch.

You use it in build scripts whenever you want to get list of files for executing build pipeline:

var aster = require('aster');

aster.watch([
  '**/*.js',
  '!node_modules/**'
])
.throttle(500)
.map(plugin1(optionsForPlugin1))
.map(plugin2(optionsForPlugin2))
// ...
.subscribe(aster.runner);

aster.watchreturns Rx.Observablewhich, in order, emits inner observable collection of file ASTs every time something changes in watched folder.

API

watch(options)

options

Type: Object

Any options that can be passed into aster.srccan be used in aster.watchas well.

options.init

Type: BooleanDefault: true

When set, emits initial collection of files before any change happens.

License

MIT License

Repository

asterjs/aster-watch


上一篇:aster-dest
下一篇:aster-parse-js
相关教程
关注微信

扫码加入 JavaScript 社区

相关文章

首次访问,需要验证
微信扫码,关注即可
(仅需验证一次)

欢迎加入 JavaScript 社区

号内回复关键字:

回到顶部