{"name":"postcss-less","version":"7.0.0","keywords":["css","postcss","postcss-syntax","parser","less"],"author":{"name":"Denys Kniazevych","email":"webschik@gmail.com"},"license":"MIT","_id":"postcss-less@7.0.0","maintainers":[{"name":"fisker","email":"lionkay@gmail.com"},{"name":"shellscape","email":"andrew@shellscape.org"}],"homepage":"https://github.com/prettier/postcss-less","bugs":{"url":"https://github.com/prettier/postcss-less/issues"},"c8":{"exclude":["lib/client*.js","test/"],"include":["lib/*.js"],"reporter":["lcov","text"]},"ava":{"files":["!**/fixtures/**","!**/helpers/**"],"verbose":true},"dist":{"shasum":"4e7c68b2d757efff5adcef3e4f1607765f46104a","tarball":"http://registry-npm.ywwl.com/postcss-less/download/postcss-less-7.0.0.tgz","fileCount":11,"integrity":"sha512-1OXufSAe+Um1gW3ydpFlpVqUEPRdiGg2zt+Man5Qa48mAXdgxBYhbE6FP4xbrgUgfhFTAFRjhCL/JvljMHZO6w==","signatures":[{"sig":"MEUCIQD6nx77YB7W2mhgmEhQjYdL7aRtCZyn5RlFAh2EmglPHQIgfKm2Thop1LhHJtM+NnjrOd21j4RS3v2b7+2gLk+5uso=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCWUqbxUyyvMAgNTI4tmIVUQ3PcmgUxfDbDLmJ82nnfJAIhAIiwJD0wOuUTawoecwA5fPf16oXqTi8gKpxJlWCBJc7B","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22167,"size":7734,"noattachment":false,"key":"/postcss-less/-/postcss-less-7.0.0.tgz"},"type":"module","engines":{"node":">=22"},"exports":"./lib/index.js","gitHead":"e9ca3ec9205116c0821b7ca2ea66bce4c47dc430","scripts":{"fix":"run-p --continue-on-error \"fix:*\"","lint":"run-p --continue-on-error \"lint:*\"","test":"ava","release":"release-it","fix:eslint":"yarn lint:eslint --fix","lint:eslint":"eslint .","fix:prettier":"prettier . --write","lint:prettier":"prettier . --check","test-coverage":"c8 yarn test"},"_npmUser":{"name":"fisker","email":"lionkay@gmail.com"},"maintainer":"Andrew Powell <andrew@shellscape.org>","repository":{"url":"git+https://github.com/prettier/postcss-less.git","type":"git"},"_npmVersion":"9.1.2","description":"LESS parser for PostCSS","directories":{},"sideEffects":false,"_nodeVersion":"24.22.0","_hasShrinkwrap":false,"packageManager":"yarn@4.18.1","devDependencies":{"c8":"12.0.0","ava":"8.2.0","less":"4.9.1","eslint":"10.13.0","cheerio":"1.2.0","globals":"17.13.0","outdent":"0.8.0","postcss":"8.5.32","prettier":"3.9.10","url-join":"6.0.0","@eslint/js":"10.0.1","release-it":"21.1.1","npm-run-all2":"9.0.4","is-absolute-url":"5.0.0","postcss-parser-tests":"8.10.0","eslint-config-prettier":"10.1.8"},"peerDependencies":{"postcss":"^8.5.32"},"_npmOperationalInternal":{"tmp":"tmp/postcss-less_7.0.0_1793174408052_0.9752542634627801","host":"s3://npm-registry-packages-npm-production"},"readme":"[coverage_badge]: https://img.shields.io/codecov/c/github/prettier/postcss-less.svg?style=flat-square\n[coverage_link]: https://app.codecov.io/gh/prettier/postcss-less\n[license_badge]: https://img.shields.io/npm/l/postcss-less.svg?style=flat-square\n[license_link]: https://github.com/prettier/postcss-less/blob/main/license\n[package_version_badge]: https://img.shields.io/npm/v/postcss-less.svg?style=flat-square\n[package_link]: https://www.npmjs.com/package/postcss-less\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS-SCSS]: https://github.com/postcss/postcss-scss\n[LESS]: https://lesscss.org/\n[Autoprefixer]: https://github.com/postcss/autoprefixer\n[Stylelint]: http://stylelint.io/\n\n# postcss-less\n\n[![Npm Version][package_version_badge]][package_link]\n[![MIT License][license_badge]][license_link]\n[![Coverage][coverage_badge]][coverage_link]\n\nA [PostCSS] Syntax for parsing [LESS]\n\n_Note: This module requires Node v6.14.4+. `poscss-less` is not a LESS compiler. For compiling LESS, please use the official toolset for LESS._\n\n## Install\n\nUsing npm:\n\n```console\nnpm install postcss-less --save-dev\n```\n\n<a href=\"https://www.patreon.com/shellscape\">\n  <img src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" width=\"160\">\n</a>\n\nPlease consider [becoming a patron](https://www.patreon.com/shellscape) if you find this module useful.\n\n## Usage\n\nThe most common use of `postcss-less` is for applying PostCSS transformations directly to LESS source. eg. ia theme written in LESS which uses [Autoprefixer] to add appropriate vendor prefixes.\n\n```js\nimport postcss from 'postcss';\nimport syntax from 'postcss-less';\n\nconst result = await postcss().process(lessText, { syntax: syntax });\n\nresult.content; // LESS with transformations\n```\n\n## LESS Specific Parsing\n\n### `@import`\n\nParsing of LESS-specific `@import` statements and options are supported.\n\n```less\n@import (option) 'file.less';\n```\n\nThe AST will contain an `AtRule` node with:\n\n- an `import: true` property\n- a `filename: <String>` property containing the imported filename\n- an `options: <String>` property containing any [import options](http://lesscss.org/features/#import-atrules-feature-import-options) specified\n\n### Inline Comments\n\nParsing of single-line comments in CSS is supported.\n\n```less\n:root {\n  // Main theme color\n  --color: red;\n}\n```\n\nThe AST will contain a `Comment` node with an `inline: true` property.\n\n### Mixins\n\nParsing of LESS mixins is supported.\n\n```less\n.my-mixin {\n  color: black;\n}\n```\n\nThe AST will contain an `AtRule` node with a `mixin: true` property.\n\n#### `!important`\n\nMixins that declare `!important` will contain an `important: true` property on their respective node.\n\n### Variables\n\nParsing of LESS variables is supported.\n\n```less\n@link-color: #428bca;\n```\n\nThe AST will contain an `AtRule` node with a `variable: true` property.\n\n_Note: LESS variables are strictly parsed - a colon (`:`) must immediately follow a variable name._\n\n## Stringifying\n\nTo process LESS code without PostCSS transformations, custom stringifier\nshould be provided.\n\n```js\nimport postcss from 'postcss';\nimport syntax from 'postcss-less';\n\nconst less = `\n    // inline comment\n\n    .container {\n        .mixin-1();\n        .mixin-2;\n        .mixin-3 (@width: 100px) {\n            width: @width;\n        }\n    }\n\n    .rotation(@deg:5deg){\n      .transform(rotate(@deg));\n    }\n`;\n\nconst result = await postcss().process(less, { syntax });\n\n// will contain the value of `less`\nconst { content } = result;\n```\n\n## Use Cases\n\n- Lint LESS code with 3rd-party plugins.\n- Apply PostCSS transformations (such as [Autoprefixer](https://github.com/postcss/autoprefixer)) directly to the LESS source code\n\n## Meta\n\n[CONTRIBUTING](./.github/CONTRIBUTING)\n\n[LICENSE (MIT)](./LICENSE)\n","publish_time":1793174408148,"_cnpm_publish_time":1793174408148,"dist-tags":{"latest":"7.0.1"}}