How to use the devextreme-themebuilder/modules/builder.buildTheme function in devextreme-themebuilder

To help you get started, we’ve selected a few devextreme-themebuilder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DevExpress / devextreme-cli / commands / themebuider.js View on Github external
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);

devextreme-themebuilder

DevExtreme ThemeBuilder

SEE LICENSE IN README.md
Latest version published 10 days ago

Package Health Score

90 / 100
Full package analysis

Popular devextreme-themebuilder functions