{"id":15379369,"url":"https://github.com/tadatuta/bem-tools-create-by-css","last_synced_at":"2025-04-15T17:38:16.917Z","repository":{"id":28984560,"uuid":"119917783","full_name":"tadatuta/bem-tools-create-by-css","owner":"tadatuta","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-11T23:47:50.000Z","size":40,"stargazers_count":44,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T23:11:12.843Z","etag":null,"topics":["bem","css"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=I4dxWRlknJM","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tadatuta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-02T01:59:07.000Z","updated_at":"2023-11-20T07:41:17.000Z","dependencies_parsed_at":"2025-02-28T05:50:20.102Z","dependency_job_id":"954c8236-208a-4114-8293-beb889c82de5","html_url":"https://github.com/tadatuta/bem-tools-create-by-css","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadatuta%2Fbem-tools-create-by-css","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadatuta%2Fbem-tools-create-by-css/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadatuta%2Fbem-tools-create-by-css/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadatuta%2Fbem-tools-create-by-css/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tadatuta","download_url":"https://codeload.github.com/tadatuta/bem-tools-create-by-css/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766683,"owners_count":21158302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bem","css"],"created_at":"2024-10-01T14:18:56.610Z","updated_at":"2025-04-15T17:38:16.898Z","avatar_url":"https://github.com/tadatuta.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# css-to-bem-file-structure\n\nGenerate [BEM file structure](https://en.bem.info/methodology/filestructure/) by CSS file.\n\n## Installation\n\n```sh\nnpm i css-to-bem-file-structure --save-dev\n```\n\n## Usage\n\nTo generate [nested structure](https://en.bem.info/methodology/filestructure/#nested) use\n```sh\n./node_modules/.bin/bemify path-to-styles.css\n```\n\nIn this case you may customize separators with environment variables `ELEM_SEPARATOR` and `ELEM_MOD_SEPARATOR`.\n\n## Advanced usage\n\nTo customize [file structure organization](https://en.bem.info/methodology/filestructure/) use `css-to-bem-file-structure` binary. It supports the same [bem-config](https://github.com/bem/bem-sdk/tree/master/packages/config#config) file as [bem-tools-create](https://www.npmjs.com/package/bem-tools-create#configuration) package.\n\nNOTE: such configuration was never tested and considered deprecated. List of imports won't be generated in this case.\n\n```sh\n./node_modules/.bin/css-to-bem-file-structure path-to-styles.css\n```\n\n```sh\n./node_modules/.bin/css-to-bem-file-structure path-to-styles.css blocks css\n```\n\n## How it works\n\nFor file `test.css` with\n\n```css\n.b1 { color: red; }\n\n.b1__e1 { color: yellow; }\n\n.b1_m1_v1 { color: lightcoral; }\n\n.b2 { color: green; }\n\n.b2__e1_m1 { color: #eee; }\n```\n\nfollowing files will be generated:\n\n```\nblocks/\n    b1/\n        __e1/\n            b1__e1.css\n        _m1/\n            b1_m1_v1.css\n        b1.css\n\n    b2/\n        __e1/\n            _m1/\n                b2__e1_m1.css\n        b2.css\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftadatuta%2Fbem-tools-create-by-css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftadatuta%2Fbem-tools-create-by-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftadatuta%2Fbem-tools-create-by-css/lists"}