How to use the postcss-less.parse function in postcss-less

To help you get started, we’ve selected a few postcss-less 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 springtype-org / springtype / src / packages / cli / st-tss / src / cli.ts View on Github external
switch (fileNameExtension(file)) {

                case "sass":
                    console.error('TODO: Sass not implemented yet, file will be empty!');
                    postcssSass.process(code).result.root;
                    sassFiles++;
                    break;
                case "scss":
                    console.error('TODO: Sass not implemented yet, file will be empty!');
                    postcssScss.parse(code);
                    scssFiles++;
                    break;
                case "less":
                    console.error('TODO: Sass not implemented yet, file will be empty!');
                    postcssLess.parse(code);
                    lessFiles++;
                    break;
                case "css":
                    tss = transformCSStoTSS(postcssCss.parse(code));
                    destinationFile = destinationFile.replace('.css', '.tss.ts');
                    cssFiles++;
            }

            if (!existsSync(destinationDirectory)) {
                mkdirSync(destinationDirectory);
            }

            process.chdir(destinationDirectory);

            writeFileSync(destinationFile, tss);

postcss-less

LESS parser for PostCSS

MIT
Latest version published 3 years ago

Package Health Score

73 / 100
Full package analysis