How to use the postcss-less/dist/less-parser.prototype 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 brodybits / prettierx / src / language-css / parser-postcss.js View on Github external
function requireParser(isSCSSParser) {
  if (isSCSSParser) {
    return require("postcss-scss");
  }

  // TODO: Remove this hack when this issue is fixed:
  // https://github.com/shellscape/postcss-less/issues/88
  const LessParser = require("postcss-less/dist/less-parser");
  LessParser.prototype.atrule = function() {
    return Object.getPrototypeOf(LessParser.prototype).atrule.apply(
      this,
      arguments
    );
  };

  return require("postcss-less");
}
github brodybits / prettierx / src / language-css / parser-postcss.js View on Github external
LessParser.prototype.atrule = function() {
    return Object.getPrototypeOf(LessParser.prototype).atrule.apply(
      this,
      arguments
    );
  };

postcss-less

LESS parser for PostCSS

MIT
Latest version published 3 years ago

Package Health Score

71 / 100
Full package analysis