@start/plugin-watch
TypeScript icon, indicating that this package has built-in type declarations

2.0.0Β β€’Β PublicΒ β€’Β Published

πŸ‘€ 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

chokidar 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/')
    )
  )

Package Sidebar

Install

npm i @start/plugin-watch

Weekly Downloads

24

Version

2.0.0

License

MIT

Unpacked Size

4.55 kB

Total Files

5

Last publish

Collaborators

  • fosimus
  • psxcode
  • deepsweet