Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
await installThemeBuilder(version);
} catch(e) {
console.log(`The devextreme-themebuilder npm package of v${version} was not installed. Please verify you are using v18.2.5 or higher and examine the installation error log to further troubleshoot the issue.`);
return;
}
const themeBuilder = require('devextreme-themebuilder/modules/builder');
const baseParameters = require('devextreme-themebuilder/modules/base-parameters');
lock.release();
setWidgetsOption(options, version);
let content = '';
const result = await themeBuilder.buildTheme(options);
const filter = getVarsFilter(options);
createPath(options.out);
if(options.command === commands.BUILD_THEME) {
content = result.css;
if(result.swatchSelector) {
console.log(`Add the '${result.swatchSelector}' class to the container to apply swatch styles to its nested elements.`);
}
if(result.unusedWidgets && result.unusedWidgets.length) {
console.log('Styles for the following widgets were not included in the resulting theme because these widgets don\'t use CSS styles:\n');
result.unusedWidgets.forEach(w => console.log(`${w}\n`));
}
} else if(options.command === commands.BUILD_VARS) {
const metadata = getMeta(result.compiledMetadata, options.base, filter, baseParameters);