• Stars
    star
    313
  • Rank 133,714 (Top 3 %)
  • Language
    JavaScript
  • Created about 12 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

deps

Stub to start a new BEM project

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.

Build Status

There are two main BEM libraries are linked here by default:

Installation requirements

  • Node.js 4+ is a platform built on JavaScript runtime for easily building fast, scalable network applications.
  • Git Bash if you use Windows OS.

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.

Supported browsers

The list of supported browsers depends on the bem-core and bem-components library versions.

Note: Internet Explorer 8.0 is not supported by default. To support IE8 you must follow the recomendations.

Installation

It's as easy as...

git clone https://github.com/bem/project-stub.git --depth 1 my-bem-project
cd my-bem-project
npm install

Note: Do not use root rights to install npm dependencies.

Usage

You may use ENB or gulp to build the project.

You can run enb commands via ./node_modules/.bin/enb.

Build the project

./node_modules/.bin/enb make

or

./node_modules/.bin/gulp

To be able to run commands without typing a full path to an executable file (./node_modules/.bin/enb), use:

export PATH=./node_modules/.bin:$PATH

Now you can use enb or gulp from the root of your project.

enb make

or

gulp

The basic commands

Execute the following commands in your terminal.

Start the dev server

./node_modules/.bin/enb server

You could use the npm start command to start the enb server without specifying the full path to the node_modules.

npm start

The development server is running. To check it out, navigate to http://localhost:8080/desktop.bundles/index/index.html.

You may also specify different port if 8080 is already taken by some other service:

npm start -- --port=8181

Stop the server

Press Ctrl + C while the terminal is your active window to stop the server.

Add a block

It is possible to create blocks with bem create command:

bem create new-block

Add a page

mkdir -p desktop.bundles/page
touch desktop.bundles/page/page.bemjson.js

And add following content:

module.exports = {
    block: 'page',
    title: 'page',
    head: [
        { elem: 'css', url: 'page.min.css' }
    ],
    scripts: [{ elem: 'js', url: 'page.min.js' }],
    content: [
       {
           block: 'new-block',
           content: [
               'block content'
           ]
       }
    ]
};

Docs

Project-stub based projects

Videos

More Repositories

1

bem-react

A set of tools for developing user interfaces using the BEM methodology in React
TypeScript
440
star
2

yandex-ui

Yandex UI Kit build on React and bem-react
TypeScript
352
star
3

bem-components

Set of components for sites development
JavaScript
332
star
4

bem-core

BEM Core Library
JavaScript
275
star
5

html-differ

Π‘ompares two HTML
JavaScript
211
star
6

bem-bl

Base BEM library
JavaScript
197
star
7

bem-xjst

bem-xjst (eXtensible JavaScript Templates): declarative template engine for the browser and server
JavaScript
115
star
8

bem-sdk

BEM SDK packages
JavaScript
88
star
9

next-global-css

A preset for nextjs allowing using 3d party libraries with global css
JavaScript
86
star
10

themekit

Build system of design-tokens for any platforms
TypeScript
73
star
11

bh

BH template engine
JavaScript
68
star
12

bem-express

BEM project-stub with BEMTREE and express
JavaScript
43
star
13

bh-php

PHP port of https://github.com/bem/bh. It's cool thing but better use this:
PHP
33
star
14

bem-react-boilerplate

DEPRECATED! A bare minimum frontend boilerplate based on create-react-app and bem-react-core.
TypeScript
31
star
15

sssr

Master class for BEMup
JavaScript
30
star
16

bem-react-components

Components library for develop with React and BEM methodology
JavaScript
29
star
17

bem-mvc

Yet another MVC for i-bem
JavaScript
29
star
18

web-platform

React SDK for building modern, accessible and cross-platforms interfaces
TypeScript
28
star
19

gulp-bem

Usefull gulp modules and plugins to work with BEM methodology
JavaScript
25
star
20

webpack-bem-loader

Webpack BEM loader
JavaScript
24
star
21

bem-history

BEM wrap for History API
JavaScript
22
star
22

bem-identity

BEM brand identity
20
star
23

bem-calendar

calendar based on bem-components
JavaScript
16
star
24

storybook-to-figma

The tool for importing Storybook components to Figma
TypeScript
15
star
25

yandex-ui-icons

TypeScript
13
star
26

yandex-ui-themer

A simple way to create your theme for @yandex/ui with Themekit
TypeScript
12
star
27

babel-plugin-bem-import

BEM import resolver
JavaScript
9
star
28

eslint-plugin-bem-xjst

ESLint environments for bem-xjst
JavaScript
9
star
29

bem-components-php

Set of bh.php templates for bem-components library
PHP
9
star
30

figma-extractor

TypeScript
8
star
31

bem-components-dist

Prebuilt version of bem-components library
JavaScript
8
star
32

jscs-bem

jscs bem preset and some tasty rules
JavaScript
6
star
33

bem-forum

BEM forum on top of github issues
JavaScript
6
star
34

bem-core-dist

Prebuilt version of bem-core library
JavaScript
6
star
35

bem-core-php

bh.php templates for bem-core
PHP
5
star
36

babel-plugin-bem

Babel plugin BEM
JavaScript
5
star
37

ts-docgen-next

Webpack loader for generating documentation from typescript files.
TypeScript
4
star
38

jsd

JSDoc parser
JavaScript
4
star
39

cra-template-yandex-ui

TypeScript
2
star
40

bem-jsdoc3-plugin

Plugin for http://usejsdoc.org/ for documenting bem enteties
JavaScript
2
star
41

es5-shims

es5 shims moved from bem-core
JavaScript
2
star
42

webpack-bem-plugin

JavaScript
1
star
43

design-system

TypeScript
1
star
44

webpack-bem-i18n-loader

JavaScript
1
star
45

bem-jsd

Wrapper for use JSD with BEM plugins
JavaScript
1
star