From a43a60e5b8bedb31c1da0071fd96cc3d14c50265 Mon Sep 17 00:00:00 2001 From: Evgeny Kruglov Date: Mon, 16 Nov 2015 23:43:14 +0300 Subject: [PATCH] Make babel-cli watching only given files and extensions. Use --only, --ignore and --extensions while process filenames with --out-file option. --- packages/babel-cli/src/babel/file.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/babel-cli/src/babel/file.js b/packages/babel-cli/src/babel/file.js index 068cd3b870..01ec93c711 100644 --- a/packages/babel-cli/src/babel/file.js +++ b/packages/babel-cli/src/babel/file.js @@ -137,6 +137,8 @@ module.exports = function (commander, filenames, opts) { persistent: true, ignoreInitial: true }).on("all", function (type, filename) { + if (util.shouldIgnore(filename) || !util.canCompile(filename, commander.extensions)) return; + if (type === "add" || type === "change") { util.log(type + " " + filename); try {