mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
28 lines
677 B
JavaScript
28 lines
677 B
JavaScript
const moduleIdRegex = /moduleId: module.id,/g;
|
|
const moduleNameRegex = /moduleId: __moduleName,/g;
|
|
const moduleIdPath = /module.id.replace/g;
|
|
|
|
module.exports = function(source) {
|
|
this.cacheable();
|
|
|
|
if (moduleIdRegex.test(source)) {
|
|
source = source.replace(moduleIdRegex, (match) => {
|
|
return `// ${match}`;
|
|
});
|
|
}
|
|
|
|
if (moduleNameRegex.test(source)) {
|
|
source = source.replace(moduleNameRegex, (match) => {
|
|
return `// ${match}`;
|
|
});
|
|
}
|
|
|
|
if (moduleIdPath.test(source)) {
|
|
source = source.replace(moduleIdPath, (match) => {
|
|
return `''.replace`;
|
|
});
|
|
}
|
|
|
|
return source;
|
|
}
|