{"_id":"@aissab/postcss-modules-sync","name":"@aissab/postcss-modules-sync","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@aissab/postcss-modules-sync","version":"1.0.1","description":"A PostCSS plugin to use CSS Modules synchronously in js - upgrade dependencies","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/schiehll/postcss-modules-sync.git"},"keywords":["PostCSS","CSS Modules"],"author":{"name":"schiehll","email":"rn.schiehll@gmail.com","url":"http://github.com/schiehll"},"license":"MIT","scripts":{"build":"babel ./src --out-dir ./lib"},"dependencies":{"generic-names":"2.0.1","icss-replace-symbols":"^1.0.2","postcss":"^8.4.29","postcss-modules-local-by-default":"^4.0.3","postcss-modules-scope":"^3.0.0","string-hash":"^1.1.0"},"devDependencies":{"babel-cli":"^6.18.0","babel-plugin-transform-class-properties":"^6.18.0","babel-preset-es2015":"^6.18.0"},"babel":{"presets":["es2015"],"plugins":["transform-class-properties"]},"gitHead":"ebace09c710f6a14f1a969ab5a97ab34af910563","bugs":{"url":"https://github.com/schiehll/postcss-modules-sync/issues"},"homepage":"https://github.com/schiehll/postcss-modules-sync#readme","_id":"@aissab/postcss-modules-sync@1.0.1","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-F441/D6ANX6g97e3evq0BkdIhbrEQaWobTs9CRtXvgDFaFlhofdF0mXYnfhdVa08QiUA8fDum7te/+D4f+x8EQ==","shasum":"6ee9cef0cd13e9ddee0a5ceeda6447d898756ab2","tarball":"https://registry.npmjs.org/@aissab/postcss-modules-sync/-/postcss-modules-sync-1.0.1.tgz","fileCount":8,"unpackedSize":7706,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD96TyRzjwZDWxWR2hFNGGeOH+Zft3NGO1GxKziFdEWlwIhALGgF9MJtsKsBwTwhPFIJsbeU8dkeXEDme6iMdDJShR9"}]},"_npmUser":{"name":"aissab","email":"aissa.berrachiche@gmail.com"},"directories":{},"maintainers":[{"name":"aissab","email":"aissa.berrachiche@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-modules-sync_1.0.1_1693981811504_0.2649059955391373"},"_hasShrinkwrap":false}},"time":{"created":"2023-09-06T06:30:11.401Z","1.0.1":"2023-09-06T06:30:11.812Z","modified":"2023-09-06T06:30:12.086Z"},"maintainers":[{"name":"aissab","email":"aissa.berrachiche@gmail.com"}],"description":"A PostCSS plugin to use CSS Modules synchronously in js - upgrade dependencies","homepage":"https://github.com/schiehll/postcss-modules-sync#readme","keywords":["PostCSS","CSS Modules"],"repository":{"type":"git","url":"git+https://github.com/schiehll/postcss-modules-sync.git"},"author":{"name":"schiehll","email":"rn.schiehll@gmail.com","url":"http://github.com/schiehll"},"bugs":{"url":"https://github.com/schiehll/postcss-modules-sync/issues"},"license":"MIT","readme":"# postcss-modules-sync \n\n> A PostCSS plugin to use CSS Modules synchronously in js.\n\n[![version](https://img.shields.io/npm/v/postcss-modules-sync.svg?style=flat-square)](http://npm.im/postcss-modules-sync)\n[![MIT License](https://img.shields.io/npm/l/postcss-modules-sync.svg?style=flat-square)](http://opensource.org/licenses/MIT)\n\n## Install\n```\nnpm install postcss-modules-sync\n```\n\n## Example\n```js\nimport CSSModulesSync from 'postcss-modules-sync'\nimport postcss from 'postcss'\n\nconst css = `\n  :global .text {\n    color: white;\n    background-color: gray;\n  }\n\n  .green {\n    background-color: green;\n  }\n\n  .blue {\n    background-color: blue;\n  }\n\n  .default {\n    composes: green;\n    display: flex;\n  }\n`\n\nlet exportedTokens = {}\nconst styles = postcss([\n  CSSModulesSync({\n    generateScopedName: '[path][local]-[hash:base64:10]',\n    getJSON: tokens => exportedTokens = tokens\n  })\n]).process(css).css\n\nconsole.log('styles', styles)\nconsole.log('tokens', exportedTokens)\n```","readmeFilename":"README.md"}