{"name":"postcss-less","version":"3.1.3","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":">=6.14.4"},"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","test":"ava"},"dependencies":{"postcss":"^7.0.14"},"devDependencies":{"@commitlint/cli":"^7.1.2","@commitlint/config-conventional":"^7.1.2","ava":"^1.0.0-beta.8","cheerio":"^1.0.0-rc.2","eslint":"^5.6.0","eslint-config-shellscape":"^2.0.2","eslint-plugin-filenames":"^1.2.0","is-absolute-url":"^2.1.0","less":"^3.8.1","lint-staged":"^8.1.0","node-fetch":"^2.2.0","nyc":"^13.3.0","postcss-parser-tests":"^6.3.1","pre-commit":"^1.2.2","standard-version":"^4.4.0","url-join":"^4.0.0"},"keywords":["css","postcss","postcss-syntax","parser","less"],"pre-commit":"lint-staged","lint-staged":{"*.js":["eslint --fix","git add"]},"gitHead":"b94e05d3f7ee82b107edeba57d759533b563041d","_id":"postcss-less@3.1.3","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"dist":{"integrity":"sha512-S0LYoO278GVmyT1uCgr1h95L19dkmzuJDMdpSMCtv+bj15OoJXtFX6c/2AlyL4OEOauGTC7nuqfudVd5kzFtuA==","shasum":"c827617861dddc029f55fcc5d4143dcd6fc8c5cd","tarball":"http://registry-npm.ywwl.com/postcss-less/download/postcss-less-3.1.3.tgz","fileCount":11,"unpackedSize":18889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciGBxCRA9TVsSAnZWagAAQckP/161e1j1JWTD5HZaNo0W\nd4vDH213NJjPEetlaZI7bZvMODTCtWWpb1tHwYVBl+x4SjcAMkxws+HhffyS\nOaI3DTZOpc3BeNBFrsPc2EsypI4qyJO5+bWzOUmf2aKHzgC/DK875NkepJh1\nNlaldVBILuvllmWEWU8iOQVz6+n7W5Y0n3adtvr+fdWQohU9gR4aHzkBv3XY\nidUovMDDlspno2D+uXIs3aT2jz0hmXaAoOk2HHw+6lHUY7Uh5K/ClbfWLWv4\nYoAN0zeqwoxRzzF+ET5e0Hd5JD/pK+riSyBt8OInMfzwMyByKKya9Mo5r7Nl\niDpIfabGBlO1JXcvOkvon25NtJbhHDQazIalBiaHM9rGa9u8E7QLd/7a4Jh0\ntNSH/GBpYSbGZsrV+LbpAZ4AFYlRPem/QwaWRoOyN8aMS/3uyyyNUSxe4UYl\ntrTRnzIoQc3CutuyJDN5bQ5T8dkFFWgJamvbWOyTTQtHFSUW34kFwl6NizyK\nLeYD+mOC+5BaIfN1Ot6f2TQteU/HtuDOK2mUh9lCYK2lxSbdacnl15DcXx03\nxFvgTFu4oQYo9jDdwLfbiqskvqDGAu9QAP15rmEvsvwpLb0ePepKY7HaalTs\nAkETTbd9gq7SVvQ79aUpPlOBy2f3gEninbuGvd/yr3m269FnTQwkYs2oIOZb\nYFZ7\r\n=X6CF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH5ZW8cgd6eMTMTpGwI4hDmallGRXFflNynKJhRZmowbAiASIiorVqApQZxTF6NFD2I2ViilqcBtYAukVxkYkC8utQ=="}],"size":6616,"noattachment":false,"key":"/postcss-less/-/postcss-less-3.1.3.tgz"},"maintainers":[{"name":"shellscape","email":"andrew@shellscape.org"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-less_3.1.3_1552441456460_0.4079652220698593"},"_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":1552441456614,"_cnpm_publish_time":1552441456614,"dist-tags":{"latest":"7.0.1"}}