MCPcopy Index your code
hub / github.com/adaptlearning/adapt_framework / adaptInjectPlugins

Function adaptInjectPlugins

grunt/tasks/javascript.js:255–279  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

253 };
254
255 const adaptInjectPlugins = function() {
256 return {
257
258 name: 'adaptInjectPlugins',
259
260 transform(code, moduleId) {
261 const isRollupHelper = (moduleId[0] === '\u0000');
262 if (isRollupHelper) {
263 return null;
264 }
265 const isPlugins = (moduleId.includes('/' + options.pluginsModule + '.js'));
266 if (!isPlugins) {
267 return null;
268 }
269 // Dynamically construct plugins.js with plugin dependencies
270 code = `define([${pluginPaths.map(filename => {
271 return `"${filename}"`;
272 }).concat(reactTemplatePaths.map(filename => {
273 return `"${filename}"`;
274 })).join(',')}], function() {});`;
275 return code;
276 }
277
278 };
279 };
280
281 const targets = buildConfig.targets || null;
282 const browserList = fs.existsSync('.browserslistrc')

Callers 1

javascript.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected