{"name":"postcss-markdown","version":"1.0.0-alpha.1","publishConfig":{"access":"public","tag":"next"},"description":"PostCSS syntax for parsing Markdown","engines":{"node":"^12 || >=14"},"main":"./lib/index.js","repository":{"type":"git","url":"git+https://github.com/ota-meshi/postcss-markdown.git"},"keywords":["postcss","syntax","markdown","html","css","less","sass","scss","sss","sugarss"],"author":{"name":"gucong"},"contributors":[{"name":"Yosuke Ota","url":"https://github.com/ota-meshi"}],"license":"MIT","bugs":{"url":"https://github.com/ota-meshi/postcss-markdown/issues"},"homepage":"https://github.com/ota-meshi/postcss-markdown#readme","nyc":{"reporter":["lcov","text"],"cache":true,"check-coverage":true},"scripts":{"mocha":"mocha \"test/**/*.js\" --no-timeouts","test":"nyc npm run mocha","lint":"eslint .","eslint-fix":"eslint . --fix","preversion":"npm run test"},"dependencies":{"postcss":"^8.3.9","postcss-safe-parser":"^6.0.0","remark-parse":"^9.0.0","unified":"^9.2.2"},"devDependencies":{"@ota-meshi/eslint-plugin":"^0.10.0","autoprefixer":"^10.3.7","chai":"^4.2.0","codecov":"^3.8.1","eslint":"^8.0.0","eslint-config-prettier":"^8.3.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-json-schema-validator":"^1.2.35","eslint-plugin-jsonc":"^1.7.0","eslint-plugin-node":"^11.1.0","eslint-plugin-node-dependencies":"^0.5.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-regexp":"^1.4.1","eslint-plugin-yml":"^0.10.1","mocha":"^9.0.0","mocha-chai-jest-snapshot":"^1.1.3","nyc":"^15.1.0","postcss-html":"^1.0.0-0","postcss-less":"^5.0.0","postcss-scss":"^2.0.0","postcss-styl":"^0.9.0","prettier":"^2.4.1","stylelint":"^14.0.0","stylelint-config-standard":"^23.0.0","sugarss":"^4.0.0"},"gitHead":"0aca6493fe61921303bfb1aaa2fd56a8f58d1d47","readme":"# PostCSS Markdown Syntax\n\n[![NPM license](https://img.shields.io/npm/l/postcss-markdown.svg)](https://www.npmjs.com/package/postcss-markdown)\n[![NPM version](https://img.shields.io/npm/v/postcss-markdown/next.svg?style=flat-square)](https://www.npmjs.com/package/postcss-markdown/v/next)\n[![NPM downloads](https://img.shields.io/npm/dw/postcss-markdown.svg)](http://www.npmtrends.com/postcss-markdown)\n[![NPM downloads](https://img.shields.io/npm/dm/postcss-markdown.svg)](http://www.npmtrends.com/postcss-markdown)\n[![NPM downloads](https://img.shields.io/npm/dy/postcss-markdown.svg)](http://www.npmtrends.com/postcss-markdown)\n[![Build Status](https://github.com/ota-meshi/postcss-markdown/workflows/CI/badge.svg?branch=master)](https://github.com/ota-meshi/postcss-markdown/actions?query=workflow%3ACI)\n\n<img align=\"right\" width=\"95\" height=\"95\"\n title=\"Philosopher’s stone, logo of PostCSS\"\n src=\"http://postcss.github.io/postcss/logo.svg\">\n\n[PostCSS](https://github.com/postcss/postcss) syntax for parsing [Markdown](https://daringfireball.net/projects/markdown/syntax)\n\n## Getting Started\n\nFirst thing's first, install the module:\n\n```bash\nnpm install postcss-markdown@next --save-dev\n```\n\nIf you want support SCSS/SASS/LESS/SugarSS syntax, you need to install the corresponding module.\n\n- SCSS: [postcss-scss](https://github.com/postcss/postcss-scss)\n- SASS: [postcss-sass](https://github.com/aleshaoleg/postcss-sass)\n- LESS: [postcss-less](https://github.com/shellscape/postcss-less)\n- SugarSS: [sugarss](https://github.com/postcss/sugarss)\n- Stylus: [postcss-styl](https://github.com/ota-meshi/postcss-styl)\n\n## Use Cases\n\n```js\nconst postcss = require(\"postcss\");\nconst syntax = require(\"postcss-markdown\")({\n    // Enable support for HTML (default: true)\n    htmlInMd: true,\n    // syntax for parse scss (non-required options)\n    scss: require(\"postcss-scss\"),\n    // syntax for parse less (non-required options)\n    less: require(\"postcss-less\"),\n    // syntax for parse css blocks (non-required options)\n    css: require(\"postcss-safe-parser\"),\n});\nconst autoprefixer = require(\"autoprefixer\");\npostcss([autoprefixer])\n    .process(source, { syntax: syntax })\n    .then(function (result) {\n        // An alias for the result.css property. Use it with syntaxes that generate non-CSS output.\n        result.content;\n    });\n```\n\ninput:\n\n<pre><code># title\n\n```css\n::placeholder {\n    color: gray;\n}\n```\n</code></pre>\n\noutput:\n\n<pre><code># title\n\n```css\n::-moz-placeholder {\n    color: gray;\n}\n:-ms-input-placeholder {\n    color: gray;\n}\n::placeholder {\n    color: gray;\n}\n```\n</code></pre>\n\nIf you want support SCSS/SASS/LESS/SugarSS syntax, you need to install these module:\n\n- SCSS: [postcss-scss](https://github.com/postcss/postcss-scss)\n- SASS: [postcss-sass](https://github.com/aleshaoleg/postcss-sass)\n- LESS: [postcss-less](https://github.com/shellscape/postcss-less)\n- SugarSS: [sugarss](https://github.com/postcss/sugarss)\n- Stylus: [postcss-styl](https://github.com/ota-meshi/postcss-styl)\n\n## Advanced Use Cases\n\n### Options\n\n```js\nconst options = {\n    rules: [\n        {\n            // custom language\n            test: /^postcss$/i,\n            lang: \"scss\",\n        },\n        {\n            // custom language\n            test: /^customcss$/i,\n            lang: \"custom\",\n        },\n    ],\n\n    // custom parser for CSS (using `postcss-safe-parser`)\n    css: \"postcss-safe-parser\",\n    // custom parser for SASS (PostCSS-compatible syntax.)\n    sass: require(\"postcss-sass\"),\n    // custom parser for SCSS (by module name)\n    scss: \"postcss-scss\",\n    // custom parser for LESS (by module path)\n    less: require.resolve(\"./node_modules/postcss-less\"),\n    // custom parser for SugarSS\n    sugarss: require(\"sugarss\"),\n    // custom parser for custom language\n    custom: require(\"postcss-custom-syntax\"),\n};\nconst syntax = require(\"postcss-markdown\")(options);\n```\n\n## Turning PostCSS off from within your Markdown\n\nPostCSS can be temporarily turned off by using special comments in your Markdown. For example:\n\n<pre><code>&lt;!-- postcss-ignore -->\n```css\na {\n    color: red;\n}\n```\n</code></pre>\n\n## Linting with Stylelint\n\nThe main use case of this plugin is to apply linting with [Stylelint] to CSS (and CSS-like) code blocks in markdown file.\n\nYou can use it by configuring your `stylelint` config as follows:\n\n```json\n{\n    \"overrides\": [\n        {\n            \"files\": [\"*.md\", \"**/*.md\"],\n            \"customSyntax\": \"postcss-markdown\"\n        }\n    ]\n}\n```\n\n[stylelint]: https://stylelint.io/\n","readmeFilename":"README.md","_id":"postcss-markdown@1.0.0-alpha.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-XWrdXqswuiewIq+QDBP+dzx/LhHY/2zRMgnxI0M6DO8jp+4FNLL4VYV+kXwExNuhDXM9wUcKnkJzWyU1Q2P15w==","shasum":"158007e23efec37d5513123ed8be4397066f50e4","tarball":"http://registry-npm.ywwl.com/postcss-markdown/download/postcss-markdown-1.0.0-alpha.1.tgz","fileCount":11,"unpackedSize":20578,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIQLXMBrE367dzQOMGHiTCWTGfQnV852e9eK4uRBcuEgIhAL3qmvQKGbD+mYIRTchxcjbTWayivhCYMauvJYFFDaQg"}],"size":7056,"noattachment":false,"key":"/postcss-markdown/-/postcss-markdown-1.0.0-alpha.1.tgz"},"_npmUser":{"name":"ota-meshi","email":"otameshiyo23@gmail.com"},"directories":{},"maintainers":[{"name":"jeddy3","email":"npm@richardhallows.com"},{"name":"ai","email":"andrey@sitnik.ru"},{"name":"gucong","email":"gucong@gmail.com"},{"name":"ota-meshi","email":"otameshiyo23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-markdown_1.0.0-alpha.1_1634901078294_0.4732876689825165"},"_hasShrinkwrap":false,"publish_time":1634901078439,"_cnpm_publish_time":1634901078439,"dist-tags":{"latest":"2.0.0","next":"1.0.0-beta.2"}}