Copy .bem
, GNUmakefile
, package.json
to your Django project root.
Run npm install
to install all dependencies specified in package.json
.
Just run make
and it will build only what's needed.
Django apps are blocks on the project root level. So you can run bem create block <appname>
to create new app with all BEM related features inside.
Models are blocks on <appname>/models
level. So you can run bem create block -l <appname>/models <modelname>
to create new model.
Views are blocks on <appname>/pages
level. So you can run bem create block -l <appname>/pages <modelname>
to create new view.
All templates that are used to create new files are defined in .bem/techs/*.js
files. Feel free to modify them.