Atom Packages Directory

a package directory for a text editor of the 21st Century

On Save

Install with:
    apm install on-save
  



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 would be:

javascript [ { "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

Keywords: save, file, run, command, watch, watcher, trigger, hook, track, execute, shell Suggest keywords
Fork me on GitHub