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

Function generateIncludedRegExp

grunt/helpers.js:53–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52 // privates
53 const generateIncludedRegExp = function() {
54 const includes = grunt.config('includes') || [];
55 const pluginTypes = exports.defaults.pluginTypes;
56
57 // Return a more specific plugin regExp including src path.
58 const re = _.map(includes, function(plugin) {
59 return _.map(pluginTypes, function(type) {
60 // eslint-disable-next-line no-useless-escape
61 return exports.defaults.sourcedir + type + '\/' + plugin + '\/';
62 }).join('|');
63 }).join('|');
64 // eslint-disable-next-line no-useless-escape
65 const core = exports.defaults.sourcedir + 'core\/';
66 return new RegExp(core + '|' + re, 'i');
67 };
68
69 const generateNestedIncludedRegExp = function() {
70 const includes = grunt.config('includes') || [];

Callers 1

getIncludedRegExpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected