{"id":13494069,"url":"https://github.com/bem/project-stub","last_synced_at":"2025-04-05T09:10:31.464Z","repository":{"id":4574020,"uuid":"5715599","full_name":"bem/project-stub","owner":"bem","description":"deps","archived":false,"fork":false,"pushed_at":"2020-07-24T01:45:42.000Z","size":2710,"stargazers_count":313,"open_issues_count":26,"forks_count":197,"subscribers_count":52,"default_branch":"master","last_synced_at":"2025-03-29T08:09:50.057Z","etag":null,"topics":["bem","boilerplate","skeleton","starter-kit","stub"],"latest_commit_sha":null,"homepage":"","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/bem.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":"2012-09-07T10:48:30.000Z","updated_at":"2025-03-15T20:58:29.000Z","dependencies_parsed_at":"2022-09-21T18:30:59.664Z","dependency_job_id":null,"html_url":"https://github.com/bem/project-stub","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bem%2Fproject-stub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bem%2Fproject-stub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bem%2Fproject-stub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bem%2Fproject-stub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bem","download_url":"https://codeload.github.com/bem/project-stub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312085,"owners_count":20918344,"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","boilerplate","skeleton","starter-kit","stub"],"created_at":"2024-07-31T19:01:21.471Z","updated_at":"2025-04-05T09:10:31.402Z","avatar_url":"https://github.com/bem.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Stub to start a new BEM project\n\nProject-stub is a template project repository used for BEM projects creation. It contains the minimal configuration files and folders you will need for quick start from scratch.\n\n[![Build Status](https://travis-ci.org/bem/project-stub.svg?branch=master)](https://travis-ci.org/bem/project-stub)\n\nThere are two main BEM libraries are linked here by default:\n\n* [bem-core](https://en.bem.info/libs/bem-core/)\n* [bem-components](https://en.bem.info/libs/bem-components/)\n\n## Installation requirements\n\n* [Node.js 4+](https://nodejs.org) is a platform built on JavaScript runtime for easily building fast, scalable network applications.\n* [Git Bash](https://git-for-windows.github.io/) if you use Windows OS.\n\n**Note:** If your operating system is Windows, you must run the following commands in Git Bash with administrator rights. Make sure that you launch Git Bash as an administrator.\n\n## Supported browsers\n\nThe list of supported browsers depends on the [bem-core](https://en.bem.info/libs/bem-core/current/#supported-browsers) and [bem-components](https://en.bem.info/libs/bem-components/current/#supported-browsers) library versions.\n\n**Note:** Internet Explorer 8.0 is not supported by default. To support IE8 you must follow the [recomendations](https://en.bem.info/libs/bem-components/current/#support-for-internet-explorer-8).\n\n## Installation\n\nIt's as easy as...\n\n```bash\ngit clone https://github.com/bem/project-stub.git --depth 1 my-bem-project\ncd my-bem-project\nnpm install\n```\n\n**Note:** Do not use `root` rights to install `npm` dependencies.\n\n## Usage\n\nYou may use [ENB](https://en.bem.info/toolbox/enb/) or `gulp` to build the project.\n\nYou can run `enb` commands via `./node_modules/.bin/enb`.\n\n### Build the project\n\n```bash\n./node_modules/.bin/enb make\n```\nor\n```bash\n./node_modules/.bin/gulp\n```\n\nTo be able to run commands without typing a full path to an executable file (`./node_modules/.bin/enb`), use:\n\n```bash\nexport PATH=./node_modules/.bin:$PATH\n```\n\nNow you can use `enb` or `gulp` from the root of your project.\n\n```bash\nenb make\n```\nor\n\n```bash\ngulp\n```\n\n### The basic commands\n\nExecute the following commands in your terminal.\n\n#### Start the dev server\n\n```bash\n./node_modules/.bin/enb server\n```\n\nYou could use the `npm start` command to start the `enb server` without specifying the full path to the `node_modules`.\n\n```bash\nnpm start\n```\n\nThe development server is running. To check it out, navigate to [http://localhost:8080/desktop.bundles/index/index.html](http://localhost:8080/desktop.bundles/index/index.html).\n\nYou may also specify different port if `8080` is already taken by some other service:\n\n```bash\nnpm start -- --port=8181\n```\n\n#### Stop the server\n\nPress `Ctrl` + `C` while the terminal is your active window to stop the server.\n\n#### Add a block\n\nIt is possible to create blocks with `bem create` command:\n\n```bash\nbem create new-block\n```\n\n#### Add a page\n\n```bash\nmkdir -p desktop.bundles/page\ntouch desktop.bundles/page/page.bemjson.js\n```\n\nAnd add following content:\n```js\nmodule.exports = {\n    block: 'page',\n    title: 'page',\n    head: [\n        { elem: 'css', url: 'page.min.css' }\n    ],\n    scripts: [{ elem: 'js', url: 'page.min.js' }],\n    content: [\n       {\n           block: 'new-block',\n           content: [\n               'block content'\n           ]\n       }\n    ]\n};\n```\n\n## Docs\n\n- [Static page quick-start](https://en.bem.info/platform/tutorials/quick-start-static/)\n- [Starting your own BEM project](https://en.bem.info/platform/tutorials/start-with-project-stub/)\n- [Tutorial for BEMJSON template-engine](https://en.bem.info/platform/bemjson/)\n- [Tutorial on BEMHTML](https://en.bem.info/platform/bem-xjst/)\n- [Tutorial on i-bem.js](https://en.bem.info/platform/tutorials/i-bem/)\n\n## Project-stub based projects\n\n- [SSSR (Social Services Search Robot)](https://github.com/bem/sssr) — study app with BEM full-stack\n\n## Videos\n\n- [BEM - Building 'em modular](https://www.youtube.com/watch?v=huQp7gr3WPE)\n- [BEM for JavaScript Talk on Camp JS](https://en.bem.info/talks/campjs-melbourne-2014/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbem%2Fproject-stub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbem%2Fproject-stub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbem%2Fproject-stub/lists"}