BEM projectStub to start a new
Project-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.
There are two main BEM libraries are linked here by default:
- Git Bash if you use Windows OS.
NB Internet Explorer 8.0 is not supported by default. To support IE8 you must follow the recomendations or use the alternative way — a generator-bem-stub that ensures an optimal config file for your project creation.
So, how easy is it to get started with BEM? — Super easy!
It's as easy as...
git clone https://github.com/bem/project-stub.git --depth 1 --branch v1.0.0 my-bem-project cd my-bem-project npm install # Do not use root rights to install npm and bower dependencies.
bower dependencies are installed in the
libs directory by
You can run any
enb commands from a
node_modules/.bin/enb directory and the
bem-tools commands from
Build the project with ENB
To be able to run
enb commands without typing a full path to an executable file (
Now you can use
enb from any point of your project.
Build the project with bem-tools
To be able to run bem-tools commands without typing a full path to an executable file (
bem-cli npm package:
npm install -g bem-cli
The alternative method:
Now you can use
bem-tools from any point of your project.
The basic commands
Execute the following commands in your terminal.
You could use help option to get information about the basic commands of
Start the server with ENB
You could use the
npm start command to start the
enb server without specifying the full path to the
Start the server with bem-tools
bem server is running. To check it out, navigate to
Stop the server
C (for MAC devices) while the terminal is your active window to stop the server.
Add a block
bem create -l desktop.blocks -b newBlock
Add a page
bem create -l desktop.bundles -b page
You could add aliases for super easy use:
echo "alias 'bemblock'='bem create -l desktop.blocks -b'" >> ~/.bashrc echo "alias 'bempage'='bem create -l desktop.bundles -b'" >> ~/.bashrc
Generator of BEM projects for Yeoman
project-stub is a multipurpose template project that covers the most common tasks of the BEM project. If you want to create the most suitable configuration to build your project, use the generator-bem-stub.
This generator provides you the ability to get the base of BEM project in few minutes by answering the simple questions.
- Full stack quick start
- Static quick-start
- Tutorial for BEMJSON template-engine
- Tutorial on BEMHTML
- Tutorial on i-bem.js
- Commands bem-tools
Project-stub based projects
- Creating BEM application on Leaflet and 2GIS API
- Creating a menu of geo objects collections with Yandex.Maps API and BEM
- SSSR (Social Services Search Robot) — study app with BEM full-stack
- bem-cli — run bem-tools locally
- borschik — borschik is a simple but powerful builder for text-based file formats