Opal-Estate-Pro/node_modules/browser-sync/dist/cli/transforms/addDefaultIgnorePatterns.js

29 lines
889 B
JavaScript
Raw Normal View History

2019-09-13 06:27:52 +02:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var immutable_1 = require("immutable");
var defaultIgnorePatterns = [
/node_modules/,
/bower_components/,
'.sass-cache',
'.vscode',
'.git',
'.idea',
];
function addDefaultIgnorePatterns(incoming) {
if (!incoming.get("watch")) {
return [incoming, []];
}
var output = incoming.update("watchOptions", function (watchOptions) {
var userIgnored = immutable_1.List([])
.concat(watchOptions.get("ignored"))
.filter(Boolean)
.toSet();
var merged = userIgnored.merge(defaultIgnorePatterns);
return watchOptions.merge({
ignored: merged.toList(),
});
});
return [output, []];
}
exports.addDefaultIgnorePatterns = addDefaultIgnorePatterns;
//# sourceMappingURL=addDefaultIgnorePatterns.js.map