on-save

Run a shell command when you save a file

mvila

6,167

8

2.2.1

MIT

GitHub



on-save: Run a shell command when you save a file

Installation

apm install on-save

Usage

Create an .on-save.json file at the root of your project (or anywhere in the path of the files you want to watch).

For example, if you want to babelify every .js file from src to dist, the .on-save.json file content might be something like:

[
  {
    "srcDir": "src",
    "destDir": "dist",
    "files": "**/*.js",
    "command": "babel ${srcFile} --out-file ${destFile}"
  }
]

Configuration file

The content of the .on-save.json file must be an array of objects with the following properties:

License

MIT