{"name":"postcss-less","version":"6.0.0","description":"LESS parser for PostCSS","license":"MIT","repository":{"type":"git","url":"git+https://github.com/shellscape/postcss-less.git"},"author":{"name":"Denys Kniazevych","email":"webschik@gmail.com"},"maintainer":"Andrew Powell <andrew@shellscape.org>","homepage":"https://github.com/shellscape/postcss-less","bugs":{"url":"https://github.com/shellscape/postcss-less/issues"},"main":"lib/index.js","engines":{"node":">=12"},"scripts":{"ci:coverage":"nyc npm run test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"npm run lint && npm run security","ci:test":"npm run test","commitlint":"commitlint","commitmsg":"commitlint -e $GIT_PARAMS","lint":"eslint --fix --cache lib test","lint-staged":"lint-staged","security":"npm audit --audit-level=high","test":"ava"},"dependencies":{},"devDependencies":{"@commitlint/cli":"^12.1.4","@commitlint/config-conventional":"^12.1.4","ava":"^3.15.0","cheerio":"^1.0.0-rc.10","eslint-config-shellscape":"^2.0.2","eslint-plugin-filenames":"^1.2.0","is-absolute-url":"^3.0.0","less":"^4.1.1","lint-staged":"^11.0.0","node-fetch":"^2.6.1","nyc":"^15.1.0","postcss":"^8.3.5","postcss-parser-tests":"^8.3.5","pre-commit":"^1.2.2","url-join":"^4.0.0"},"peerDependencies":{"postcss":"^8.3.5"},"keywords":["css","postcss","postcss-syntax","parser","less"],"ava":{"files":["!**/fixtures/**","!**/helpers/**"]},"lint-staged":{"*.js":["eslint --fix"]},"nyc":{"include":["lib/*.js"],"exclude":["lib/client*.js","test/"]},"pre-commit":"lint-staged","gitHead":"984f4901aced4b74535d96b04242681d538d628b","_id":"postcss-less@6.0.0","_nodeVersion":"14.15.3","_npmVersion":"6.14.9","dist":{"integrity":"sha512-FPX16mQLyEjLzEuuJtxA8X3ejDLNGGEG503d2YGZR5Ask1SpDN8KmZUMpzCvyalWRywAn1n1VOA5dcqfCLo5rg==","shasum":"463b34c60f53b648c237f569aeb2e09149d85af4","tarball":"http://registry-npm.ywwl.com/postcss-less/download/postcss-less-6.0.0.tgz","fileCount":11,"unpackedSize":21904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh18YJCRA9TVsSAnZWagAAbZUP/jCXz9ZrdBBLfzOSl2wR\nqIADoNcNS1HMYJuM452HKp933yFjrqFJehpBQ695w5tQu0O+Q75fF9WK/WCt\nSSncXPm+O2Y6xelf3ysnTAwRf476DjHUAuM06w1jN+hPlb3Ngq9oHLtk8a9n\n54DLls9Ewd07bzmkApSG4FPcjB4S/k2vUVvj2waRNhJ4xzwvO5za+FAyH1al\n5NmrV09mqzcLgcRrwpTefxA8E/Z85ad8x1DEiCofW9HAO9U2Ey6dhRCca0UI\n2dIIPc098ueqzDVC0fNHfHp5HV0GIj56UWUvxXP2H8pH7PHooyNwrY7JlGTV\n3jaGDeqEoLUibkuPlO9AQJl3hVQEKWW+cu9ZxkFUdSxBugS25sOir1oCquTC\ns22DAw7dOjEXJaTQ+fIXcnyutf1MxlTQSMR+sjsaJBRzzOqdxSHpFolNbQ1t\n7Xs2vZN9v2Kh7ZfDuVEm+iv14K19QmZcEff6KPCUFi5pIHpzSHS6OxYQOR+9\naOWXBqfcyMyc/ONm564LHWtg3kwMZv5n+jzyZrrkdOEU8zsysKQJxKXQtVon\nQir2N/nJVhSdevX0DbQxAFapvfJrlP//1T0D7MQe9Ep9OKqooyaAX4nk3ytu\nRLN1tsncD0oz6pTCOn82f5g3pBmUMSv8f8RrCkLiqvvag1vW43d+EGoulpr4\np+SG\r\n=mnfs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH3Sww5KdtcLV57oEswYVvkyfIyL9fD5FXsr9lQ/dEVTAiEAv3XurR2aYsCBSIhRftL8KqRb+Xlm1ep51fHHscgaawI="}],"size":7525,"noattachment":false,"key":"/postcss-less/-/postcss-less-6.0.0.tgz"},"_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"directories":{},"maintainers":[{"name":"shellscape","email":"andrew@shellscape.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-less_6.0.0_1641530889564_0.01924339446974832"},"_hasShrinkwrap":false,"readme":"[tests]: \thttps://img.shields.io/circleci/project/github/shellscape/postcss-less.svg\n[tests-url]: https://circleci.com/gh/shellscape/postcss-less\n\n[cover]: https://codecov.io/gh/shellscape/postcss-less/branch/master/graph/badge.svg\n[cover-url]: https://codecov.io/gh/shellscape/postcss-less\n\n[size]: https://packagephobia.now.sh/badge?p=postcss-less\n[size-url]: https://packagephobia.now.sh/result?p=postcss-less\n\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[![tests][tests]][tests-url]\n[![cover][cover]][cover-url]\n[![size][size]][size-url]\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\nconst syntax = require('postcss-less');\npostcss(plugins)\n  .process(lessText, { syntax: syntax })\n  .then(function (result) {\n    result.content // LESS with transformations\n});\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\nconst postcss = require('postcss');\nconst syntax = require('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":1641530889742,"_cnpm_publish_time":1641530889742,"dist-tags":{"latest":"7.0.1"}}