Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return Promise.all(bundles.map(function({name, content, bundleInfo}) {
// console.log("creating bundle as '%s'", "/resources/" + name);
const resource = new EvoResource({
path: "/resources/" + name,
string: content
});
return resource;
}));
});
pool,
debugResources: options.debugResources,
mergedResources: options.mergedResources,
designtimeResources: options.designtimeResources,
supportResources: options.supportResources
});
// group resources by components and create ResourcesLists
collector.groupResourcesByComponents();
const resourceLists = [];
// write out resources.json files
for (const [prefix, list] of collector.components.entries()) {
log.info(` writing '${prefix}resources.json'`);
resourceLists.push(new EvoResource({
path: `/resources/${prefix}resources.json`,
string: JSON.stringify(list, null, "\t")
}));
}
for (const [prefix, list] of collector.themePackages.entries()) {
log.info(` writing '${prefix}resources.json'`);
resourceLists.push(new EvoResource({
path: `/resources/${prefix}resources.json`,
string: JSON.stringify(list, null, "\t")
}));
}
const unassigned = collector.resources;
if ( unassigned.size > 0 ) {
log.warn(` found ${unassigned.size} resources not belonging to a component (orphans)`);
let n = 0;
for ( const resource of unassigned ) {
}).then((result) => {
const themeDir = path.dirname(resource.getPath());
const libCss = new Resource({
path: themeDir + "/library.css",
string: result.css
});
const libCssRtl = new Resource({
path: themeDir + "/library-RTL.css",
string: result.cssRtl
});
const libParams = new Resource({
path: themeDir + "/library-parameters.json",
string: JSON.stringify(result.variables, null, compress ? null : "\t")
});
files.push(libCss, libCssRtl, libParams);
});
}).then((result) => {
const themeDir = path.dirname(resource.getPath());
const libCss = new Resource({
path: themeDir + "/library.css",
string: result.css
});
const libCssRtl = new Resource({
path: themeDir + "/library-RTL.css",
string: result.cssRtl
});
const libParams = new Resource({
path: themeDir + "/library-parameters.json",
string: JSON.stringify(result.variables, null, compress ? null : "\t")
});
files.push(libCss, libCssRtl, libParams);
});
};
}).then((result) => {
const themeDir = path.dirname(resource.getPath());
const libCss = new Resource({
path: themeDir + "/library.css",
string: result.css
});
const libCssRtl = new Resource({
path: themeDir + "/library-RTL.css",
string: result.cssRtl
});
const libParams = new Resource({
path: themeDir + "/library-parameters.json",
string: JSON.stringify(result.variables, null, compress ? null : "\t")
});
files.push(libCss, libCssRtl, libParams);
});
};