{"name":"postcss-less","version":"3.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":">=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:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","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.2"},"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":"^7.2.2","node-fetch":"^2.2.0","nyc":"^13.0.1","postcss-parser-tests":"^6.3.0","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":"a5d33d12bd10879534b17de3322391da70eeb080","_id":"postcss-less@3.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.1.0","_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"dist":{"integrity":"sha512-sP9zF8v2859AashwrD8kFdrres+ZNuPcgs4YEhsNKv/vHkblocURLlL2vrbka7K6QL8EOFXmp2KHifnk0Ta3bg==","shasum":"3623af4243f287402d278c4a5f1e9a67a94427c3","tarball":"http://registry-npm.ywwl.com/postcss-less/download/postcss-less-3.0.0.tgz","fileCount":11,"unpackedSize":16287,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbpcWPCRA9TVsSAnZWagAAvvMP/1FCh2qzmpheNzratjms\naRikRKgbK1Q56cYd3RBZNE2h4FZYik9Gm3f6sdHhGj1QITF0c5sOp9wyF8ah\ntq/D/vX6qqVnxGLSiwb4Hc4Q1XYfUleTzZFxv8ClpddA31DvtdNHuT6WJ46l\nE3+OoIb60SNA/ZUk3Esjf6Ez5eVSTPM8JRHDDtATAKig+ZFGOYuRZDUpiJ1p\nJCJaOaYdfNVd4zDnBq2i8qB39FJX0k/hTUmrMRXFO9EoHoEMOVApw3g/ICwX\noKSsYeuqeqK9ET4/51MhkIpd741RS3yEtYSUmhsZsZa2K42/MiT3fcrmPqrD\nvUeZ3FEXwA3KIcwJioAiZuflDFP6bxWxAY+LB2b+EIiqGlfWLO5h2QW2cJRT\nOzlJIx+ALQihYQhyT/5wU5u/56VuNDi2I/7DUKD2TgOq/vVZkbz/srMGQNF7\nS+AC/kBorw9i4ZQj8V0ssUZRDCw8OM6wywZXOAazmsMa/4aQDowa0IV3kmk0\nIW5G5vRU+mU2UHm9+EuVZCVocygxBqgDD2SjqC+3iGOC4/IvHu2wEaGywdz0\nGAUa893pqr4fS5I+J5pbNOiYQBFH/gFJk+PyVRMl8OmGIazQ6CJkFR91omPK\nQSj2Hv3prXMUKpZjoXplaQuaOtCaCHXzzCsaNTZO6Gy7DMJAVWzpeTBOMQTo\njMus\r\n=W1X5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4R9rpGhGJ6VTF+F9GHmUMr46TAzHNY8M8ZcgQQTNsEAIgP6FiSKIZ+zQFGNcHPWnIsqw+FVLzZ5eIwQ3zUezDcKY="}],"size":5918,"noattachment":false,"key":"/postcss-less/-/postcss-less-3.0.0.tgz"},"maintainers":[{"name":"shellscape","email":"andrew@shellscape.org"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-less_3.0.0_1537590670432_0.6842945313619464"},"_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":1537590670663,"_cnpm_publish_time":1537590670663,"dist-tags":{"latest":"7.0.1"}}