From 5ce43b682775cd51c58e24b4c1e08f350d40246e Mon Sep 17 00:00:00 2001 From: Chanond Wongpiya Date: Fri, 28 Jul 2017 03:15:59 +0700 Subject: [PATCH] Exclude file from gulp (#7786) --- src/Gulpfile.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Gulpfile.js b/src/Gulpfile.js index d9554f622..8ea0b094c 100644 --- a/src/Gulpfile.js +++ b/src/Gulpfile.js @@ -97,7 +97,13 @@ function resolveAssetGroupPaths(assetGroup, assetManifestPath) { assetGroup.manifestPath = assetManifestPath; assetGroup.basePath = path.dirname(assetManifestPath); assetGroup.inputPaths = assetGroup.inputs.map(function (inputPath) { - return path.resolve(path.join(assetGroup.basePath, inputPath)); + var excludeFile = false; + if (inputPath.startsWith('!')) { + inputPath = inputPath.slice(1); + excludeFile = true; + } + var newPath = path.resolve(path.join(assetGroup.basePath, inputPath)); + return (excludeFile ? '!' : '') + newPath; }); assetGroup.watchPaths = []; if (assetGroup.watch) {