A Mimosa module that will automatically restart Mimosa when your compiled directory is removed
JavaScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.npmignore
README.md
mimosa-config.js
package.json

README.md

mimosa-restart

Overview

This module will restart the Mimosa process when you delete certain folders/files.

For more information regarding Mimosa, see http://mimosa.io

NOTE: This module requires Mimosa v2.2.4 or higher.

Usage

Add 'restart' to your list of modules. That's all! Mimosa will install the module for you when you start mimosa watch or mimosa build.

Functionality

This module will watch configured directories and when they are removed/updated it will shut down the existing Mimosa and restart a new one within the same process.

This, for example, saves you the trouble of needing to restart Mimosa from the command line if your compiledDir gets out of sync, like when switching branches while Mimosa is running.

Or you could configure Mimosa to restart when the mimosa-config.js is changed.

Default Configuration

restart: {
  updated:[],
  deleted:[]
}
  • updated, an array of strings. Paths, relative to the root of your project, to files/directories that, when updated, would cause Mimosa to be restarted.
  • deleted, an array of strings. Paths, relative to the root of your project, to files/directories that, when removed, would cause Mimosa to be restarted.

Example Configuration

restart: {
  removed:["public"],
  updated:["mimosa-config.js"]
}