{"_id":"@dr.pogodin/postcss-icss-values","_rev":"1-4a7fa5d9859e82c1ac371cefcaedfc4d","name":"@dr.pogodin/postcss-icss-values","dist-tags":{"latest":"2.1.0"},"versions":{"2.1.0":{"name":"@dr.pogodin/postcss-icss-values","version":"2.1.0","description":"PostCSS plugin for CSS Modules to pass arbitrary values between your module files","main":"lib/index.js","scripts":{"build":"babel --out-dir lib src","test":"jest --coverage"},"lint-staged":{"*.js":["prettier --write","eslint","git add"]},"eslintConfig":{"parserOptions":{"sourceType":"module"},"env":{"es6":true},"extends":"eslint:recommended"},"babel":{"presets":[["@babel/env",{"targets":"current node"}]]},"repository":{"type":"git","url":"git+https://github.com/birdofpreyru/postcss-icss-values.git"},"keywords":["css","modules","postcss"],"author":{"name":"Dr. Sergey Pogodin"},"license":"MIT","devDependencies":{"@babel/cli":"^7.11.6","@babel/preset-env":"^7.11.5","babel-jest":"^26.3.0","eslint":"^7.10.0","husky":"^4.3.0","jest":"^26.4.2","postcss":"^8.1.1","prettier":"^2.1.2","strip-indent":"^3.0.0"},"dependencies":{"icss-utils":"^5.0.0-rc.0","lodash":"^4.17.4","postcss-value-parser":"^4.1.0"},"peerDependencies":{"postcss":"^8.1.1"},"gitHead":"a69505874c461659cf08a210dc3083e45dbbe8af","bugs":{"url":"https://github.com/birdofpreyru/postcss-icss-values/issues"},"homepage":"https://github.com/birdofpreyru/postcss-icss-values#readme","_id":"@dr.pogodin/postcss-icss-values@2.1.0","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-t4H1gaYcCU43KwMATmGVlyY1TRHST+Kr4anFZ3f6tv0K47K+c/emYxW+dmyuLEKf3C/bjmbrRrlEFcOmwJqn1w==","shasum":"0fb2b3e322b36ec9f4646ec41d2ded05d7a9ed3e","tarball":"https://registry.npmjs.org/@dr.pogodin/postcss-icss-values/-/postcss-icss-values-2.1.0.tgz","fileCount":4,"unpackedSize":10248,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcy5FCRA9TVsSAnZWagAAHO8P/37M0bocIwwsGBEAY2kJ\noSOR6YT+ktCP6Kl/UHKbi7N9vSvl0sWx3djGESrp9edA4uLdrTI/qYXBgxTy\nC685yn3SSE6fw1c7sI9ne8bNx8Y6RDG6K9BGfQNR7cCIzcqnBx+7jgwEHXXn\nMZr1nUc063WwicWNVB+aLOCR+UT5BzW6fDKKPkaLQtWEDyGmBO3U56xt786K\nZX1E/s7n+cW9VxSUSylHBPpaR7INqSjmTPPf9eMDeLrFJA9GZlI2HB4U/yLD\n4mQWUjkdXFVE8NdNddeiXsi654QNObdFqOBdNgaP7GX4ouW+yvA8kmoQuNoY\nj3Ge3TjGnDSayfcz9E80gpbiSX0eX7WfJQ3u3hd8Nbsedr5VezZVxlIv5Xgp\nR6xaUysngiPHvNBjBj7ea433Df7umchZS6dImjuitZcQPZ7kk47x0pqRkhWY\nLbqi5aWrJGRpYsXzG+m3V/A30zBZGebTIkypC7UTJXieIRFzcw5pv/ttdr1T\nALlkLQyufwMo8jI3JozsViVHA3X4XgFO8p/OyLCYC0uO18G0XObjgvj4MPvp\nJ+fkV082j5cUpkiMtMtOv4Aa3b8q/+Dltmbp1F5DBgskdud+bP2zlQ0alX0P\nH1ZAn1QAfPTeAVc+KCgUclHovOxVdAxxkTitKtsKjOfqO1e2t31hO6Rd1zB6\nxv81\r\n=SGXz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCszkx8qddb1vyKtQ/lIjVSA1cLwHN099/vV6QVFkqEvQIgfMV4m7q+f4mmQ9iQu2Y3nqrXkqrbTk5TLSCc8QE3jB4="}]},"maintainers":[{"name":"dr.pogodin","email":"dr.pogodin+studio@gmail.com"}],"_npmUser":{"name":"dr.pogodin","email":"dr.pogodin+studio@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-icss-values_2.1.0_1601384004813_0.6045112729057651"},"_hasShrinkwrap":false}},"time":{"created":"2020-09-29T12:53:24.765Z","2.1.0":"2020-09-29T12:53:24.937Z","modified":"2022-04-05T05:34:31.828Z"},"maintainers":[{"name":"dr.pogodin","email":"dr.pogodin+studio@gmail.com"}],"description":"PostCSS plugin for CSS Modules to pass arbitrary values between your module files","homepage":"https://github.com/birdofpreyru/postcss-icss-values#readme","keywords":["css","modules","postcss"],"repository":{"type":"git","url":"git+https://github.com/birdofpreyru/postcss-icss-values.git"},"author":{"name":"Dr. Sergey Pogodin"},"bugs":{"url":"https://github.com/birdofpreyru/postcss-icss-values/issues"},"license":"MIT","readme":"# PostCSS ICSS Values\n\n_An upgraded fork of [postcss-icss-values](https://www.npmjs.com/package/postcss-icss-values)_\n\nPostCSS plugin for css modules to pass arbitrary values between your module files.\n\n## Usage\n\n```js\npostcss([ require('postcss-icss-values') ])\n```\n\nSee [PostCSS] docs for examples for your environment.\n\n### Export value\n\n```css\n/* colors.css */\n\n@value primary: #BF4040;\n/* or without colon for preprocessors */\n@value secondary #1F4F7F;\n\n.panel {\n  background: primary;\n}\n\n/* transforms to */\n\n:export {\n  primary: #BF4040;\n  secondary: #1F4F7F\n}\n\n.panel {\n  background: #BF4040;\n}\n```\n\n**If you are using Sass** along with this PostCSS plugin, do not use the colon `:` in your `@value` definitions. It will cause Sass to crash.\n\nNote also you can _import_ multiple values at once but can only _define_ one value per line.\n\n```css\n@value a: b, c: d; /* defines a as \"b, c: d\" */\n```\n\n### Importing value\n\n```css\n@value primary, secondary from './colors.css';\n\n.panel {\n  background: secondary;\n}\n\n/* transforms to similar exports */\n\n:import('./colors.css') {\n  __value__primary__0: primary;\n  __value__secondary__1: secondary\n}\n:export {\n  primary: __value__primary__0; /* this long names will be mapped to imports by your loader */\n  secondary: __value__secondary__1\n}\n\n.panel {\n  background: __value__secondary__1;\n}\n```\n\n### Importing value in JS\n\n```css\nimport { primary } from './colors.css';\n// will have similar effect\nconsole.log(primary); // -> #BF4040\n```\n\n### Aliases\n\nTo avoid conflict between names you are able to import values with aliases\n\n```css\n@value small as bp-small, large as bp-large from './breakpoints.css';\n@value (\n  small as t-small,\n  large as t-large\n) from './typo.css';\n\n@media bp-small {\n  .foo {\n    font-size: t-small;\n  }\n}\n```\n\n### Messages\n\npostcss-icss-values passes `result.messages` for each declared or imported value\n\n```json\n{\n  plugin: 'postcss-icss-values',\n  type: 'icss-value',\n  name: string, // exported identifier\n  value: string // generated imported identifier or value\n}\n```\n\n## Justification\n\nSee [this PR](https://github.com/css-modules/css-modules-loader-core/pull/28) for more background\n\n## License\n\nMIT © Glen Maddern and Bogdan Chadkin, 2015\n","readmeFilename":"README.md"}