How to use the @modular-css/processor/lib/output.js.compositions function in @modular-css/processor

To help you get started, we’ve selected a few @modular-css/processor 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 tivac / modular-css / packages / browserify / browserify.js View on Github external
bundler.on("end", () => {
            const bundling = Object.keys(bundles).length > 0;

            if(options.json) {
                mkdirp.sync(path.dirname(options.json));

                fs.writeFileSync(
                    options.json,
                    JSON.stringify(output.compositions(processor), null, 4)
                );
            }

            if(!options.css) {
                return;
            }

            const common = processor.dependencies();

            mkdirp.sync(path.dirname(options.css));

            // Write out each bundle's CSS files (if they have any)
            each(
                Object.keys(bundles).map((key) => ({
                    bundle : key,
                    files  : bundles[key],

@modular-css/processor

A streamlined reinterpretation of CSS Modules

MIT
Latest version published 1 year ago

Package Health Score

60 / 100
Full package analysis