lunaisadev-website-old/node_modules/browser-sync/dist/cli/transforms/addDefaultIgnorePatterns.js

29 lines
887 B
JavaScript
Raw Normal View History

2021-07-28 01:40:12 +00: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