{"id":17678665,"url":"https://github.com/eprev/grunt-bem","last_synced_at":"2025-05-12T22:54:03.068Z","repository":{"id":7035231,"uuid":"8310769","full_name":"eprev/grunt-bem","owner":"eprev","description":"Run bem make using BEM API","archived":false,"fork":false,"pushed_at":"2016-02-21T19:00:50.000Z","size":160,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T22:53:58.231Z","etag":null,"topics":["bem","grunt-plugins"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eprev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-20T10:18:39.000Z","updated_at":"2019-07-21T21:33:39.000Z","dependencies_parsed_at":"2022-09-15T16:22:56.904Z","dependency_job_id":null,"html_url":"https://github.com/eprev/grunt-bem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eprev%2Fgrunt-bem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eprev%2Fgrunt-bem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eprev%2Fgrunt-bem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eprev%2Fgrunt-bem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eprev","download_url":"https://codeload.github.com/eprev/grunt-bem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253837389,"owners_count":21971981,"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","grunt-plugins"],"created_at":"2024-10-24T08:05:26.458Z","updated_at":"2025-05-12T22:54:03.044Z","avatar_url":"https://github.com/eprev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-bem [![Build Status](https://travis-ci.org/eprev/grunt-bem.png)](https://travis-ci.org/eprev/grunt-bem)\n\n\u003e Run [`bem make`](https://github.com/bem/bem-tools) using BEM API.\n\n## Getting Started\n\nThis plugin requires Grunt `~0.4.0`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-bem --save-dev\n```\n\nOne the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-bem');\n```\n\n## The \"bem\" task\n\n### Overview\n\nIn your project's Gruntfile, add a section named `bem` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n    bem: {\n        options: {\n            // Task-specific options go here.\n        },\n        target: {\n            // Target-specific options go here.\n        }\n    }\n})\n```\n\n### Options\n\n#### options.require\n\nType: `String`\nDefault value: `bem`\n\nPath to require BEM library.\n\n#### options.root\n\nType: `String`\nDefault value: `.`\n\nProject root (cwd by default).\n\n#### options.method\n\nType: `String`\nDefault value: `make`\n\nMethod to run.\n\n#### options.workers\n\nType: `Integer`\nDefault value: `10`\n\nRun number of workers.\n\n#### options.force\n\nType: `Boolean`\nDefault value: `False`\n\nForce rebuild.\n\n#### options.verbosity\n\nType: `String`\nDefault value: `info`\n\nVerbosity level (silly, verbose, info, warn, debug, error).\n\n#### options.targets, target\n\nType: `String`\nDefault value: `target's name`\n\nBuild targets.\n\n### Usage Examples\n\n#### Default Options\n\nIn this example, the default options are used to do build target `all` in the level `bem-project`. BEM is installed as a global package.\n\n```js\ngrunt.initConfig({\n    bem: {\n        all: {\n            root: 'bem-project'\n        }\n    }\n})\n```\n\n#### Custom Options\n\nIn this example, custom options are used to do build targets `desktop.bundles` and `touch.bundles`. BEM is installed as a local package.\n\n```js\ngrunt.initConfig({\n    bem: {\n        options: {\n            require: 'bem-project/node_modules/bem',\n            root: 'bem-project'\n        },\n        'desktop.bundles touch.bundles': {\n            verbosity: 'warn'\n        },\n    }\n})\n```\n\n#### Advanced Example\n\n```js\ngrunt.initConfig({\n    watch: {\n        bem: {\n            files: ['bem-project/*.bundles/*/*.bemjson.js'],\n            tasks: ['bem:bundles'],\n            options: {\n                interrupt: true\n            }\n        }\n    },\n    bem: {\n        options: {\n            require: 'bem-project/node_modules/bem',\n            root: 'bem-project',\n            verbosity: 'warn'\n        },\n        'bundles': {\n            targets: 'desktop.bundles touch.bundles'\n        },\n        'bundles-forced': {\n            targets: 'desktop.bundles touch.bundles',\n            forced: true\n        }\n    }\n});\n\ngrunt.registerTask('default', ['bem:bundles-forced']);\n```\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).\n\n## Release History\n\n* 2013-02-20  v0.1.0  First official release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feprev%2Fgrunt-bem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feprev%2Fgrunt-bem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feprev%2Fgrunt-bem/lists"}