{"_id":"docz-plugin-umi-css","_rev":"2819558","name":"docz-plugin-umi-css","description":"it's fork on docz-plugin-css. why: 1. update docz-core to latest. 2. ruleOpts not publish in offical package","dist-tags":{"latest":"0.14.1"},"maintainers":[{"name":"sorrycc","email":""}],"time":{"modified":"2022-09-06T14:14:06.000Z","created":"2019-03-15T01:46:24.104Z","0.14.1":"2019-06-26T02:14:36.152Z","0.14.0":"2019-03-15T01:46:24.104Z"},"users":{},"versions":{"0.14.1":{"name":"docz-plugin-umi-css","version":"0.14.1","description":"it's fork on docz-plugin-css. why: 1. update docz-core to latest. 2. ruleOpts not publish in offical package","license":"MIT","main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","typings":"dist/index.d.ts","source":"src/index.ts","scripts":{"dev":"libundler watch --ts","build":"libundler build --ts --c","fix":"run-s fix:*","fix:prettier":"prettier \"src/**/*.{ts,tsx}\" --write","fix:tslint":"tslint --fix --project .","tslint":"tslint --project ."},"dependencies":{"autoprefixer":"^9.1.5","css-loader":"^1.0.0","deepmerge":"^2.1.1","docz-core":"^0.13.4","less":"^3.8.1","less-loader":"^4.1.0","loader-utils":"^1.1.0","mini-css-extract-plugin":"^0.4.2","optimize-css-assets-webpack-plugin":"^5.0.1","postcss":"^7.0.2","postcss-flexbugs-fixes":"^4.1.0","postcss-loader":"^3.0.0","style-loader":"^0.23.0","stylus":"^0.54.5","stylus-loader":"^3.0.2","webpack":"^4.17.2","webpack-chain":"^4.10.0"},"devDependencies":{"libundler":"^1.7.1","lint-staged":"^7.2.2","npm-run-all":"^4.1.3","prettier":"^1.14.2","trash-cli":"^1.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","typescript":"^2.9.2"},"gitHead":"c2f78ddb309ea25d2fdb810a2879564dd5bc8602","_id":"docz-plugin-umi-css@0.14.1","_nodeVersion":"10.13.0","_npmVersion":"6.8.0","dist":{"shasum":"0b0c6dee6bb97c4fc63874eabae8efbca3ff14e6","size":6987,"noattachment":false,"key":"/docz-plugin-umi-css/-/docz-plugin-umi-css-0.14.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/docz-plugin-umi-css/download/docz-plugin-umi-css-0.14.1.tgz"},"maintainers":[{"name":"sorrycc","email":""}],"_npmUser":{"name":"sorrycc","email":"sorrycc@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/docz-plugin-umi-css_0.14.1_1561515275970_0.6243241435291973"},"_hasShrinkwrap":false,"publish_time":1561515276152,"_cnpm_publish_time":1561515276152,"_cnpmcore_publish_time":"2021-12-16T11:33:22.568Z"},"0.14.0":{"name":"docz-plugin-umi-css","version":"0.14.0","description":"it's fork on docz-plugin-css. why: 1. update docz-core to latest. 2. ruleOpts not publish in offical package","license":"MIT","main":"dist/index.js","umd:main":"dist/index.umd.js","module":"dist/index.m.js","typings":"dist/index.d.ts","source":"src/index.ts","scripts":{"dev":"libundler watch --ts","build":"libundler build --ts --c","fix":"run-s fix:*","fix:prettier":"prettier \"src/**/*.{ts,tsx}\" --write","fix:tslint":"tslint --fix --project .","tslint":"tslint --project ."},"dependencies":{"autoprefixer":"^9.1.5","css-loader":"^1.0.0","deepmerge":"^2.1.1","docz-core":"^0.13.4","less":"^3.8.1","less-loader":"^4.1.0","loader-utils":"^1.1.0","mini-css-extract-plugin":"^0.4.2","node-sass":"^4.9.3","optimize-css-assets-webpack-plugin":"^5.0.1","postcss":"^7.0.2","postcss-flexbugs-fixes":"^4.1.0","postcss-loader":"^3.0.0","sass-loader":"^7.1.0","style-loader":"^0.23.0","stylus":"^0.54.5","stylus-loader":"^3.0.2","webpack":"^4.17.2","webpack-chain":"^4.10.0"},"devDependencies":{"libundler":"^1.7.1","lint-staged":"^7.2.2","npm-run-all":"^4.1.3","prettier":"^1.14.2","trash-cli":"^1.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","typescript":"^2.9.2"},"gitHead":"79377c910fe76c186f0bda149776b6f129bafecf","_id":"docz-plugin-umi-css@0.14.0","_nodeVersion":"10.13.0","_npmVersion":"6.8.0","dist":{"shasum":"b59c3d9e5a09d7f05ca953e568bb8c4f313c567a","size":7014,"noattachment":false,"key":"/docz-plugin-umi-css/-/docz-plugin-umi-css-0.14.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/docz-plugin-umi-css/download/docz-plugin-umi-css-0.14.0.tgz"},"maintainers":[{"name":"sorrycc","email":""}],"_npmUser":{"name":"sorrycc","email":"sorrycc@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/docz-plugin-umi-css_0.14.0_1552614383992_0.9010465215413279"},"_hasShrinkwrap":false,"publish_time":1552614384104,"_cnpm_publish_time":1552614384104,"_cnpmcore_publish_time":"2021-12-16T11:33:22.737Z"}},"readme":"# docz-plugin-css\n\nDocz plugin to parse css files inside your documents\n\n![](https://cdn-std.dprcdn.net/files/acc_649651/4Q4QBN)\n\n## Examples\n\n- [PostCSS](https://github.com/pedronauck/docz-plugin-css/tree/master/examples/css-postcss)\n- [Less](https://github.com/pedronauck/docz-plugin-css/tree/master/examples/css-less)\n- [Sass](https://github.com/pedronauck/docz-plugin-css/tree/master/examples/css-sass)\n- [Stylus](https://github.com/pedronauck/docz-plugin-css/tree/master/examples/css-stylus)\n\n## Installation\n\nFirst of all, install plugin:\n\n```bash\n$ yarn add docz-plugin-css --dev\n```\n\nAfter that, use the plugin on your `doczrc.js`:\n\n```js\n// doczrc.js\nimport { css } from 'docz-plugin-css'\n\nexport default {\n  plugins: [\n    css({\n      preprocessor: 'postcss',\n      cssmodules: true,\n      loaderOpts: {\n        /* whatever your preprocessor loader accept */\n      }\n    })\n  ]\n}\n```\n\n### Choosing PostCSS, Sass, Less or Stylus\n\nDo you can choose how preprocessor your bundler will use just by changing the `preprocessor` property at the plugin definition:\n\n```js\n// doczrc.js\nimport { css } from 'docz-plugin-css'\n\nexport default {\n  plugins: [\n    css({\n      preprocessor: 'sass'\n    })\n  ]\n}\n```\n\n### Using CSS Modules\n\nTo use css modules, just turn on `cssmodules` property on your project configuration:\n\n```js\n// doczrc.js\nimport { css } from 'docz-plugin-css'\n\nexport default {\n  plugins: [\n    css({\n      preprocessor: 'sass',\n      cssmodules: true\n    })\n  ]\n}\n```\n\nAfter that, to import styles from css modules, just use `.module.{preprocessor-ext}` on your files\n\n```markdown\n---\nname: Button\n----\n\nimport { Playground } from 'docz'\n\nimport { Button } from './Button'\nimport { styles } from './styles.module.css'\n\n# Button\n\nExample of Button component with custom class!\n\n<Playground>\n  <Button className={styles.custom}>\n    Click me\n  </Button>\n</Playground>\n```\n\nIf you don't pass `.module` in front of the preprocessor extension, bundler will don't parse your css as cssmodule!\n\nIf in your project some places use both CSS modules and some place doesn't, you can leave out the `cssmodules` option so that `webpack` can determined by itself the correct way to load the CSS.\n\n### Multiple pre-processor\n\nYou can still use multiple pre-processor together in the same configuration:\n\n```js\n// doczrc.js\nimport { css } from 'docz-plugin-css'\n\nexport default {\n  plugins: [\n    css({ preprocessor: 'sass' }),\n    css({ preprocessor: 'stylus' }),\n  ]\n}\n```\n\n## Api\n\n### Params\n\n#### `preprocessor`\n\n- **Type:** `postcss | sass | less | stylus`\n- **Default:** `postcss`\n\nUse to define the preprocessor you want to use\n\n#### `cssmodules`\n- **Type:** `Boolean`\n- **Default:** `false`\n\nUse this option if you want to use css modules\n\n#### `loaderOpts`\n- **Type:** `{ [key:string]: any }`\n- **Default:** `{}`\n\nCustom options passed on pre-processor loader configuration\n\n#### `cssOpts`\n- **Type:** `{ [key:string]: any }`\n- **Default:** `{}`\n\nCustom options passed on [css-loader](https://github.com/webpack-contrib/css-loader) configuration\n\n#### `ruleOpts`\n- **Type:** `{ [key:string]: any }`\n- **Default:** `{}`\n\nCustom options passed on webpack rule configuration\n","_attachments":{},"license":"MIT"}