MCPcopy Create free account
hub / github.com/adaptlearning/adapt_framework / generateExcludedRegExp

Function generateExcludedRegExp

grunt/helpers.js:81–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79 };
80
81 const generateExcludedRegExp = function() {
82 const excludes = grunt.config('excludes') || [];
83 if (grunt.config('type') === 'production') {
84 const productionExcludes = grunt.config('productionExcludes') || [];
85 excludes.push(...productionExcludes);
86 }
87 const pluginTypes = exports.defaults.pluginTypes;
88
89 // Return a more specific plugin regExp including src path.
90 const re = _.map(excludes, function(plugin) {
91 return _.map(pluginTypes, function(type) {
92 // eslint-disable-next-line no-useless-escape
93 return exports.defaults.sourcedir + type + '\/' + plugin + '\/';
94 }).join('|');
95 }).join('|');
96 return new RegExp(re, 'i');
97 };
98
99 const generateScriptSafeRegExp = function() {
100 const includes = grunt.config('scriptSafe') || [];

Callers 1

getExcludedRegExpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected