@start/plugin-watch
v2.0.0
Published
๐ Watch for new or changed files matched by glob patterns
Downloads
185
Readme
๐ plugin-watch
Watch for new or changed files matched by glob patterns.
Install
$ yarn add --dev @start/plugin-watch
Usage
Signature
watch(glob: string | string[], options?: {}): (target: StartPlugin)
options
Example
import sequence from '@start/plugin-sequence'
import read from '@start/plugin-read'
import babel from '@start/plugin-lib-babel'
import write from '@start/plugin-write'
import watch from '@start/plugin-watch'
const babelConfig = {
// โฆ
babelrc: false,
sourceMap: true,
}
export const task = () =>
watch('src/**/*.js')(
sequence(
read,
babel(babelConfig),
write('build/')
)
)