{"_id":"bem2","_rev":"1-a1604e8ae791dc3c7685129a5dc4e8ed","name":"bem2","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"bem2","description":"use bem","private":false,"version":"1.0.0","author":{"name":"bailiang.su"},"keywords":["bem","CSS Module"],"repository":{"type":"git","url":"git+https://github.com/forward-step/bem2.git"},"type":"module","main":"./dist/bem.umd.cjs","module":"./dist/bem.js","types":"./index.d.ts","exports":{"types":"./index.d.ts","import":"./dist/bem.js","require":"./dist/bem.umd.cjs"},"scripts":{"dev":"vite","build":"tsc && vite build","publish":"npm publish"},"devDependencies":{"rollup-plugin-copy":"^3.4.0","sass":"^1.62.1","typescript":"^4.9.4","vite":"^4.0.4","vite-plugin-dts":"^2.3.0"},"gitHead":"3ea17eaede931dbc1352cf38164fec969e0ce5cd","bugs":{"url":"https://github.com/forward-step/bem2/issues"},"homepage":"https://github.com/forward-step/bem2#readme","_id":"bem2@1.0.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-CdWe+b3CKAnAuI3FqeyzmNpfZtsjix2T3Wbwb47HL6SZOs+BeRxpGMlDv5sQcTgusFwiYtUOK176GLpBMq89+w==","shasum":"86faa1b49600e670694e866ea131f1f68532a683","tarball":"https://registry.npmjs.org/bem2/-/bem2-1.0.0.tgz","fileCount":6,"unpackedSize":8684,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBBkSbsGJBEm+jdq5HTT5v2juWOCUFZQbsWYrRX76MJKAiEAoMKR4QMQN3mLFqHHXYe4im5/f/52KeWiJd6AHuo/fC8="}]},"_npmUser":{"name":"supyp","email":"1978535811@qq.com"},"directories":{},"maintainers":[{"name":"supyp","email":"1978535811@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bem2_1.0.0_1683564158083_0.003040694717841186"},"_hasShrinkwrap":false},"1.0.1":{"name":"bem2","description":"use bem","private":false,"version":"1.0.1","author":{"name":"bailiang.su"},"keywords":["bem","CSS Module"],"repository":{"type":"git","url":"git+https://github.com/forward-step/bem2.git"},"type":"module","main":"./dist/bem.umd.cjs","module":"./dist/bem.js","types":"./dist/bem.d.ts","exports":{"types":"./dist/bem.d.ts","import":"./dist/bem.js","require":"./dist/bem.umd.cjs"},"scripts":{"dev":"vite","build":"tsc && vite build","publish":"npm publish"},"devDependencies":{"rollup-plugin-copy":"^3.4.0","sass":"^1.62.1","typescript":"^4.9.4","vite":"^4.0.4","vite-plugin-dts":"^2.3.0"},"gitHead":"3ea17eaede931dbc1352cf38164fec969e0ce5cd","bugs":{"url":"https://github.com/forward-step/bem2/issues"},"homepage":"https://github.com/forward-step/bem2#readme","_id":"bem2@1.0.1","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-bbip6Dhyerb7+Fpr23sTkBGPcRyLWozNQ59q3VpghSUWP7pdo29kNgHIz8RLPFvplKdR0zQiYAhAMpVKwoNj8Q==","shasum":"e26af7a92c3f8081ebb5b2bc3aef39eb9d8c2e0a","tarball":"https://registry.npmjs.org/bem2/-/bem2-1.0.1.tgz","fileCount":6,"unpackedSize":8690,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIJOZREYUWW3qZ8kQa27Oa+CSTIlLAsNVAWQleeph3BQIhALbnSJ7Re6ohYKhZJsRK+sHK+DvHYI3qrgi/wRdZtcZo"}]},"_npmUser":{"name":"supyp","email":"1978535811@qq.com"},"directories":{},"maintainers":[{"name":"supyp","email":"1978535811@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bem2_1.0.1_1683564769768_0.794159649603013"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-08T16:42:38.082Z","1.0.0":"2023-05-08T16:42:38.209Z","modified":"2023-05-08T16:52:50.069Z","1.0.1":"2023-05-08T16:52:49.957Z"},"maintainers":[{"name":"supyp","email":"1978535811@qq.com"}],"description":"use bem","homepage":"https://github.com/forward-step/bem2#readme","keywords":["bem","CSS Module"],"repository":{"type":"git","url":"git+https://github.com/forward-step/bem2.git"},"author":{"name":"bailiang.su"},"bugs":{"url":"https://github.com/forward-step/bem2/issues"},"readme":"# basic\r\n\r\n```ts\r\nimport { bem, classnames } from 'bem2';\r\n\r\nconst { emsc, em, es, ec } = bem('button');\r\nemsc('button'); // .button\r\nemsc('button', 'primary'); // .button--primary\r\nemsc('button', null, { disabled: true }); // .button.is-disabled\r\n\r\nclassnames('a', null, undefined, [1, 'b'], {'c': false, 'd': true}); // .a.1.b.d\r\n```\r\n\r\n# css\r\n\r\n```scss\r\n@import 'bem2/dist/bem.scss';\r\n\r\n// .button\r\n@include b(button) {\r\n    // .button--primary\r\n    @include m(primary) {}\r\n    // .button.is-diabled\r\n    @include when(disabled) {}\r\n}\r\n```\r\n\r\n# CSS Module\r\n\r\n```ts\r\nimport styles from './index.module.scss';\r\n\r\nconst { emsc } = bem('button', styles);\r\nconst newClassnames = classnames.bind(styles);\r\n```\r\n\r\n# bem options\r\n\r\n## ts\r\n\r\n```ts\r\nimport { bem, classnames } from 'bem2';\r\n\r\n/// default options\r\nbem.namespace = '';\r\nbem.elementSeq = '__';\r\nbem.modifferSeq = '--';\r\nbem.statePrefix = 'is-';\r\n\r\n/// test\r\nbem.namespace = 'test-';\r\nconst { emsc } = bem('button');\r\nemsc(); // .test-button\r\n\r\n```\r\n\r\n## css\r\n\r\n```scss\r\n@import '../lib/bem.scss';\r\n\r\n$namespace: 'test-';\r\n\r\n// .test-button\r\n@include b(button) {}\r\n```","readmeFilename":"README.MD"}