1.0.6 • Published 4 years ago

wabby v1.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Wabby

Watch and build

Configurable file system watcher that runs arbitrary commands when specific directories of files change.

npm version

Install

Install via NPM: npm install --save-dev wabby

Configure

Wabby requires a config file wabby.config.js to exist in your project directory.

Example wabby.config.js

'use strict';

const path = require('path');

module.exports = {
	watchers: [
		{
			command: 'npm',
			args: ['run', 'front-end-build'],
			pathsToWatch: [path.join(__dirname, 'client', 'src'), path.join(__dirname, 'client', 'test')],
		},
		{
			command: 'mix', // elixir backend
			args: ['run', '--no-halt'],
			pathsToWatch: [path.join(__dirname, 'lib'), path.join(__dirname, 'test')],
		}
	],
};

It's recommended to add wabby to package.json scripts for easy running.

	"scripts": {
		"wabby": "wabby",
		"front-end-build": "webpack && mocha --recursive"
	}

Run

npm run wabby