{"id":13772310,"url":"https://github.com/floatdrop/gulp-bem","last_synced_at":"2025-07-24T01:32:50.185Z","repository":{"id":19544360,"uuid":"22792598","full_name":"floatdrop/gulp-bem","owner":"floatdrop","description":"BEM toolset for gulp","archived":false,"fork":false,"pushed_at":"2016-06-12T08:25:08.000Z","size":833,"stargazers_count":26,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-28T10:13:39.537Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/floatdrop.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}},"created_at":"2014-08-09T18:35:28.000Z","updated_at":"2022-05-30T14:49:16.000Z","dependencies_parsed_at":"2022-08-20T22:50:14.859Z","dependency_job_id":null,"html_url":"https://github.com/floatdrop/gulp-bem","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/floatdrop/gulp-bem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fgulp-bem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fgulp-bem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fgulp-bem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fgulp-bem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floatdrop","download_url":"https://codeload.github.com/floatdrop/gulp-bem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fgulp-bem/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266779172,"owners_count":23982881,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-03T17:01:02.448Z","updated_at":"2025-07-24T01:32:50.163Z","avatar_url":"https://github.com/floatdrop.png","language":"JavaScript","funding_links":[],"categories":["Tools"],"sub_categories":["Building"],"readme":"# gulp-bem\n\n[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url]\n\nThis package provides simple and clear tools to build your BEM project with simple `deps.js` support.\n\n## Usage\n\nBuilding CSS for BEM project:\n\n```js\nvar gulp    = require('gulp');\nvar bem     = require('gulp-bem');\nvar concat  = require('gulp-concat');\n\nvar levels = ['base', 'blocks'];\nvar tree = bem(levels);\n\ntree.deps('blocks/page')\n    .pipe(bem.src('{bem}.css'))\n    .pipe(concat('index.css'))\n    .pipe(gulp.dest('./dist'));\n```\n\nPretty easy, eh, mate?\n\nTake a look at [getbem.com](https://getbem.com/) as example of full-featured web site created with BEM and [gulp-bem-stub](https://github.com/matmuchrapna/gulp-bem-stub) as starting template for projects!\n\n## API\n\n### bem(levels, [options])\n\nCreates function, that used for resolving dependencies in BEM project. Returns [`deps` function](https://github.com/floatdrop/deps-graph#depsgraphdepsbem).\n\n#### levels\nType: `Array` or `String`  \nDefault: `process.cwd()`\n\nContains array of [Levels](http://getbem.com/building). They will be used in searching for requested blocks and ordering blocks with same names in different levels.\n\n#### options\nType: `Object`\n\nOptions, that passed to [bem-naming](https://github.com/bem/bem-naming).\n\n### bem.src(glob)\n\nThis method consumes stream of BEM objects and searches files by glob pattern in them.\n\nAll files, that contained under BEM object path, following some convention about naming. Often CSS file have name of block and added `.css` suffix. If BEM object describes block with modificators, then it can be `block_mod_value.css`. You can read about [naming](https://getbem.com/naming.html) and [directory structure](https://getbem.com/building.html) at [getbem.com](https://getbem.com), if there are questions about it.\n\n#### glob\nType: `String` or `Array`  \n\nSame as in [gulp.src](https://github.com/gulpjs/gulp/blob/master/docs/API.md#gulpsrcglobs-options) method, but with some interpolation happening. To provide BEM name generation - `bem.src` will substitute (with [supplant](http://javascript.crockford.com/remedial.html) syntax) all properties in BEM object.\n\n## Related\n\n * [gulp-bem-debug](https://github.com/floatdrop/gulp-bem-debug) - nice output for BEM objects in stream.\n * [gulp-bem-specs](https://github.com/floatdrop/gulp-bem-specs) - specifications, that used in `gulp-bem`.\n * [gulp-bem-pack](https://github.com/floatdrop/gulp-bem-pack) - packing JavaScript CommonJS files with browserify.\n\n## Questions\n\n[![Gitter chat](https://badges.gitter.im/bem/talk.png)](https://gitter.im/bem/talk)\n\n## License\n\nMIT (c) 2014 Vsevolod Strukchinsky\n\n[npm-url]: https://npmjs.org/package/gulp-bem\n[npm-image]: http://img.shields.io/npm/v/gulp-bem.svg?style=flat\n\n[travis-url]: http://travis-ci.org/floatdrop/gulp-bem\n[travis-image]: http://img.shields.io/travis/floatdrop/gulp-bem.svg?branch=master\u0026style=flat\n\n[depstat-url]: https://david-dm.org/floatdrop/gulp-bem\n[depstat-image]: http://img.shields.io/david/floatdrop/gulp-bem.svg?style=flat\n\n[coveralls-url]: https://coveralls.io/r/floatdrop/gulp-bem\n[coveralls-image]: http://img.shields.io/coveralls/floatdrop/gulp-bem.svg?style=flat\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatdrop%2Fgulp-bem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloatdrop%2Fgulp-bem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatdrop%2Fgulp-bem/lists"}