{"_id":"@acolorbright/css-module-bem-loader","_rev":"7-b02b778b1e2bf090a20b1f77323ff4fe","name":"@acolorbright/css-module-bem-loader","dist-tags":{"latest":"2.0.5"},"versions":{"2.0.3":{"name":"@acolorbright/css-module-bem-loader","version":"2.0.3","description":"A webpack loader for css modules using BEM","author":{"name":"Sanjay Twisk","email":"sanjay@acolorbright.com"},"homepage":"https://github.com/acolorbright/acb-tools-and-configs#readme","license":"ISC","main":"lib/index.js","directories":{"test":"__tests__"},"repository":{"type":"git","url":"git+https://github.com/acolorbright/acb-tools-and-configs.git"},"scripts":{"test":"jest","test:dev":"jest --watchAll"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/acolorbright/acb-tools-and-configs/issues"},"devDependencies":{"css-loader":"5.2.6","jest":"27.0.3","style-loader":"2.0.0","webpack":"5.38.1"},"dependencies":{"loader-utils":"2.0.0"},"peerDependencies":{"css-loader":"5.x","webpack":">= 4.0.0"},"jest":{"modulePathIgnorePatterns":["test/fixtures","test/helpers","test/dist","lib"]},"gitHead":"da42d0477617a2639896803e731fc1945a7f5e0c","_id":"@acolorbright/css-module-bem-loader@2.0.3","_nodeVersion":"15.14.0","_npmVersion":"lerna/4.0.0/node@v15.14.0+x64 (darwin)","dist":{"integrity":"sha512-Qk/gvSOOIAli8L4vxYjC94KAjcYqCyUskwAK0KmFIskNPMYDIjqAux4EQHu9QFleCA0FV/yUYJU9Qa2txYEK8Q==","shasum":"17cfa5ec08f3ca39e46a966a9f98cc06dcd811a7","tarball":"https://registry.npmjs.org/@acolorbright/css-module-bem-loader/-/css-module-bem-loader-2.0.3.tgz","fileCount":5,"unpackedSize":6755,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwizsCRA9TVsSAnZWagAAWxgP/iTsi03x+oLS2ZTNo8af\n7J5S22cJmNqQa6qh9VMoT6GTd2CF8e3+SNMip1Uayv5ScM9q38xG60JAz+6x\n7ruRnKZu9wr3sIkF3Pg/DgwXSZ72LKlu547z9FYY/KlQxGhjDbuM6Fo80Ap3\nMKHmw8+ax9R6kMtqFd85Vo9JBCCF/miSHtjq6UQvhrqzz11NONy0K+hwb68X\nfoDj8ed5lE5+qHJVIDuaLjBGQh6d8KA7su4ibeK1SjRkIgCBcWUmxTpQexD3\nt/6OV7TBcnq1ln5VyK/7ds+6+jRsSTOKIiCxrlfnSQPb+/p+g+QAzyc+bwMy\nlIeG5KZYNYzusp7feb9dGojtWlv2duh3FVweESbfwK1Fg3QX1YhHRv3il3zN\ng6Osrlb9lBa3tkiBvUz6u3e9jPysJLOMz/FNHKsRw87j++vnTh8/nqH9CzdN\n8o6n5SLlLiF4fYLIBrlXArSyrbLjLAfSRiBt4tsLY9ubTutec3rNmR9jKfWb\nRZr6TPfBgd/X6KfybFyBx2rYmwCcoLxSd/JU1InjQy9cvcUzhCKModWp92MI\nLmdd8bUiL/Mipm/ToA/G0SuwHAxXbBsXbbpvl9pjCKJByubQscauxcMjbqvR\n/xzzmT3hFre9XfEtZa1tuMz16sE+9oyRwC38nwHzfX+1pdGULo2wvsKSClYe\neYTc\r\n=IkMl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBB6Qq5uWnIJVq/53wK2PZDvrDS0R5RBsbGXAnIn8UulAiB3cXFt7LzO2d6nNPsJaMXBnMg3VdMM9DuZH2w4ZyVoBA=="}]},"_npmUser":{"name":"sanjayacb","email":"sanjay@acolorbright.com"},"maintainers":[{"name":"sanjayacb","email":"sanjay@acolorbright.com"},{"name":"heldinz","email":"heldinz@posteo.de"},{"name":"tomislavslovenec","email":"tomislav@acolorbright.com"},{"name":"acb-devs","email":"developer@acolorbright.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/css-module-bem-loader_2.0.3_1623338219955_0.7294080499735327"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.4":{"name":"@acolorbright/css-module-bem-loader","version":"2.0.4","description":"A webpack loader for css modules using BEM","author":{"name":"Sanjay Twisk","email":"sanjay@acolorbright.com"},"homepage":"https://github.com/acolorbright/acb-tools-and-configs#readme","license":"ISC","main":"lib/index.js","directories":{"test":"__tests__"},"repository":{"type":"git","url":"git+https://github.com/acolorbright/acb-tools-and-configs.git"},"scripts":{"test":"jest","test:dev":"jest --watchAll"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/acolorbright/acb-tools-and-configs/issues"},"devDependencies":{"css-loader":"5.2.6","jest":"27.0.3","style-loader":"2.0.0","webpack":"5.38.1"},"dependencies":{"loader-utils":"2.0.0"},"peerDependencies":{"css-loader":"5.x","webpack":">= 4.0.0"},"jest":{"modulePathIgnorePatterns":["test/fixtures","test/helpers","test/dist","lib"]},"gitHead":"853956b8424a2a00604653b5ae481e98f006572e","_id":"@acolorbright/css-module-bem-loader@2.0.4","_nodeVersion":"15.14.0","_npmVersion":"lerna/4.0.0/node@v15.14.0+x64 (darwin)","dist":{"integrity":"sha512-9RiNkURVLOfg65KdEohO6hxUICCsIEnZU4vLKRF4dE/nisHyHZjCBpi9OscEboI9rw4Ba/XU1BrChV0e222eFw==","shasum":"c9486853286b4fc7c843a472bd159691c32536e1","tarball":"https://registry.npmjs.org/@acolorbright/css-module-bem-loader/-/css-module-bem-loader-2.0.4.tgz","fileCount":5,"unpackedSize":6786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg00FiCRA9TVsSAnZWagAAzqUQAIzuN3J+1ydkJNyl8Te9\nWw691/u9YDrI0oKvjGHdwQ99jdwyHx5W5OVfjvNtKoPW1kyJKsBLieH8MYji\nSaEq2d+14QXJWyU3movawm+FPax6SDaolxgozJY/ROm+TumDyQdmrhKT3b6Z\nobhCWmoyYzwElM5OohNdfXcn6ePYC8sfDBor/UaIMQVquUqwTxkFUcgQHkfc\nY9BcI5vRw3pmDV9av4IAaYXkTMDHtVZdWqMYYI8vG+eeDOMBYsXpWW3GnbDw\nm9hLwrXLwxvrBNkHL0N2X42Vva7DC9U0lXHimgtkWhXSIMcxJNaRwBwPmqKc\neF7RZ7yr3PX767E9MI25ANHfoZDz3fhCCVxuo4oa37FTTovKS3HAmiUBAlsh\nlxCa3qpe/KdrAWUHV/PyRaU+8zgPwh9t0A/aH/427Xcp2MgPv/1dP4HWv1YK\nRDHnZdKrn7R8TUvBu8x874ajEzKnDrjQgBQBuTPf3igEprgG/RDdMq6xRKO1\nflDEocj8ar3f9Bd5nG227KdcyoVyaGvvGhxF8TWqTvvqccQi0bCKy3rchF4M\n8bqE1jcqtGS3w8Hcj1zfadCdfEoWBGKwHAFVKXtMR5ykHwkiClj5AOPedeqx\nXl8TKUNuDy2mj45WYd/95nGiIYzKuzT7MscbUZUXFte79lqPp97fkTzb0qGL\nyYNa\r\n=5rEI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDcgoHKWRe7ZXcFGzwCEitakG5/ZsIVaSP1zDuAufdVQAiBpQXcnteMLX4cZQiKPPpkhmZe6QJIfGNbpDKVaBh0m9w=="}]},"_npmUser":{"name":"sanjayacb","email":"sanjay@acolorbright.com"},"maintainers":[{"name":"sanjayacb","email":"sanjay@acolorbright.com"},{"name":"heldinz","email":"heldinz@posteo.de"},{"name":"tomislavslovenec","email":"tomislav@acolorbright.com"},{"name":"acb-devs","email":"developer@acolorbright.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/css-module-bem-loader_2.0.4_1624457569945_0.9546934359474275"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.5":{"name":"@acolorbright/css-module-bem-loader","version":"2.0.5","description":"A webpack loader for css modules using BEM","author":{"name":"Sanjay Twisk","email":"sanjay@acolorbright.com"},"homepage":"https://github.com/acolorbright/acb-tools-and-configs#readme","license":"ISC","main":"lib/index.js","directories":{"test":"__tests__"},"repository":{"type":"git","url":"git+https://github.com/acolorbright/acb-tools-and-configs.git"},"scripts":{"test":"jest","test:dev":"jest --watchAll"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/acolorbright/acb-tools-and-configs/issues"},"devDependencies":{"css-loader":"5.2.6","jest":"27.0.3","style-loader":"2.0.0","webpack":"5.38.1"},"dependencies":{"loader-utils":"2.0.0"},"peerDependencies":{"css-loader":"5.x","webpack":">= 4.0.0"},"jest":{"modulePathIgnorePatterns":["test/fixtures","test/helpers","test/dist","lib"]},"gitHead":"4ed272543d5a5f0699483a9407b4724c934a23bb","_id":"@acolorbright/css-module-bem-loader@2.0.5","_nodeVersion":"15.14.0","_npmVersion":"lerna/4.0.0/node@v15.14.0+x64 (darwin)","dist":{"integrity":"sha512-eWbMssnifLZGpxQPJc59cezrZK5yUeo1iFDvVcbf0MNQrNp1J0z2n+PV3aKNsz393ANs6QOag5KNiqmeQqsTRA==","shasum":"52a5dc379e16d5cd5aa6e56e99bba225124dbb3d","tarball":"https://registry.npmjs.org/@acolorbright/css-module-bem-loader/-/css-module-bem-loader-2.0.5.tgz","fileCount":5,"unpackedSize":6830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1vu1CRA9TVsSAnZWagAAvL0P/0h+LObm1AjiW6HAkCP+\nwacvEMBpU3IHJ+mN29vMCAlTqg0QL200TJRECv6sE5b8F36hgwwZrErnCag4\niZ5ujaGGzrayKVuF908sqoYPbAGRTqkh4SEbgn73CfN7mnJ+l4hxYf1yzce1\n96yOsGPTcwMUrsVP8OwOIi1nJSonXCcIVj7GVcXyUTlOGMJ3JtcqAvDGNCIl\nZtwvrl5o9YVnk9gj3RobnFWCAGptGDuxhzqY9RJF/xBV7aDYQ0M3M8WnplJq\nypybsWiabHd1BuQnIQTAJl9iOpKUKkNWCeW0kY1C4IXzqUP8PZEz5CmAH1IW\n/pjKfREJ35G4YMB+HccRdGOIr3aSavRLT1y91QojmmQRnbWitIgcUmUTT8HT\nZHfdjYyuxnVNt1oRdEV1mMr9XvZ4i4ec5H7Cmm6Q35qyBGtz7Iq7aVONt1ET\ny1mRzGsc09+PsB/1Ib4F1bjtGd3XiH9CtTx5LrDrq9wEu/jOYrNb9IINIn6e\ntv21ZES2wWAQOUt1iR3rXSFYwFJfx5qk3zth9O7s4XicpkVCq43/tvu/Y3Al\ngcVn2NGzzOZ6fkX8Aj3OsYqWsRjkrpBPxh3GFQMRcK41qU5BtiBLcHuY3t7a\nXEh7clN/GFy5SX6Z3hm07l6PpLF8VRa5r4EuakKYqibevsGAD3N9mP3qC+dJ\ntYQ0\r\n=Z4AF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHU61uCslQ2fmSfL3lZBfIac1SPb5N5Xb65J9cqMwLTbAiEA3VUZzyxH9gpsXztRRAblDohj8hUc+hMmAIiXQIRSo6Y="}]},"_npmUser":{"name":"sanjayacb","email":"sanjay@acolorbright.com"},"maintainers":[{"name":"sanjayacb","email":"sanjay@acolorbright.com"},{"name":"heldinz","email":"heldinz@posteo.de"},{"name":"tomislavslovenec","email":"tomislav@acolorbright.com"},{"name":"acb-devs","email":"developer@acolorbright.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/css-module-bem-loader_2.0.5_1624523956730_0.6966932441653024"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2021-06-10T15:16:59.596Z","2.0.3":"2021-06-10T15:17:00.100Z","modified":"2023-03-29T15:11:14.815Z","2.0.4":"2021-06-23T14:12:50.078Z","2.0.5":"2021-06-24T08:39:16.864Z"},"maintainers":[{"email":"dev-team@acolorbright.com","name":"acb-devs"}],"description":"A webpack loader for css modules using BEM","homepage":"https://github.com/acolorbright/acb-tools-and-configs#readme","repository":{"type":"git","url":"git+https://github.com/acolorbright/acb-tools-and-configs.git"},"author":{"name":"Sanjay Twisk","email":"sanjay@acolorbright.com"},"bugs":{"url":"https://github.com/acolorbright/acb-tools-and-configs/issues"},"license":"ISC","readme":"# `css-module-bem-loader`\n\nA webpack loader to transform a CSS module object with additional BEM features\n\n## Install\n\nThis CSS loader depends on `webpack` and `css-loader` to work.\n\n```sh\nnpx install-peerdeps -D @acolorbright/css-module-bem-loader && npm install -DE @acolorbright/css-module-bem-loader\n```\n\n## Configure\n\nThe css module BEM loader can only be used in combination with `css-loader` and has to be applied after `css-loader` and before `style-loader` in the webpack configuration. The loader only works with `.module.css` and `.modules.scss` files.\n\n```js\n{\n  test: /\\.module\\.css/,\n  use: [\n    'style-loader',\n    '@acolorbright/css-module-bem-loader',\n    {\n      loader: 'css-loader',\n      options: {\n        modules: {\n          namedExport: false,\n          mode: 'pure'\n        }\n      }\n    }\n  ]\n}\n```\n\n> Note that the loader doesn't work with the `modules.namedExport` css-loader option enabled.\n> The module can be used with or without the css-loader option `esModule`\n\n## Usage\n\nIn order to use the loader correctly you need to make sure that a module's block classname is equal to the module's filename:\n\n```css\n/* navigation.module.css */\n.navigation {\n  /* styles */\n}\n\n.navigation__links {\n  /* styles */\n}\n\n.navigation--expanded {\n  /* styles */\n}\n```\n\nThe transformed styles object applies scopes for your BEM classnames so that it's easier to select classnames without having to look up complex keys containing dashes and underscores:\n\n```js\nimport styles from './navigation.module.css'\n\n/* get the block className */\nstyles.block\n\n/* get an element className */\nstyles.element.links\n\n/* get a modifier className */\nstyles.modifier.expanded\n```\n\nSince there's only one block selector, the `block` key returns a string. For the elements and modifiers the object provides two nested objects `element` and `modifier` which contain the relevant classnames without the `block__` and `block--` prefix.\n\n> In case the block classname doesn't contain any CSS rules, the block classname will return an empty string\n> The BEM keys are being added on top of the original object keys, so it's still possible to use the module without the added keys\n","readmeFilename":"README.md"}