UNPKG

rivet

Version:

Suite of utilities for working with the Rivet consumer-driven API contacts testing model.

16 lines (15 loc) 590 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var log_1 = require("../../lib/log"); var compile_1 = require("./compile"); exports.default = function (argv) { log_1.log('Watching for changes...'); var chokidar = require('chokidar'); var cwd = argv.cwd, ignore = argv.ignore, out = argv.out; var compile = function (path) { return compile_1.default({ src: path, ignore: ignore, cwd: cwd, out: out }); }; chokidar.watch(argv.src, { ignored: '**/node_modules/**/*' }) .on('add', compile) .on('change', compile); };