Installation

npm

npm i -D rollup-plugin-watcher-amstramgram

Manually

Download the plugin in a rollup-plugin-watcher-amstramgram folder located at the root of your project.

Dependencies

If you have chosen the manual way, install also fast-glob.

npm i -D fast-glob

Usage

...
//import rollup-plugin-watcher-amstramgram from the folder where you downloaded it :
import watcher from './rollup-plugin-watcher-amstramgram/esm/index.mjs'
//Or if you have installed it from npm :
//import watcher from 'rollup-plugin-watcher-amstramgram'
...

export default = {
  input: 'src/js/index.js',
  output: {
    file: 'dist/js/index.js',
    format: ...
  },
  plugins: [
    ...
    watcher( {
      //Watch the dev/assets folder and all it subdirectories
      files: 'dev/assets', 
    }),
    ...
  ]
}

Options

files

Either a String or an Array of Strings.

Each element should be a valid glob, or a string pointing to an existing file or directory.
See here how to.

verbose

A Boolean that specifies whether messages and notifications should be sent to the terminal.
(default : false).

warnOnError

A Boolean that specifies whether warnings should be logged for process errors.
(default : true).