Code Monkey home page Code Monkey logo

bem-core's Introduction

BEM Core Library Build Status

This README is also availabe in Russian.

What is this?

bem-core is a base library for web interface development. It provides the minimal stack for coding client-side JavaScript and templating.

Use

The easiest way to run a project with bem-core is to use the project-stub.

You can use any other way you are familiar with to include the library into the project.

Inside

Levels

  • common.blocks — suited for any devices and browsers
  • desktop.blocks — should be used for desktop browsers
  • touch.blocks — implement some touch-platforms specifics

Blocks

  • i-bem — base block with helpers for JS and HTML
  • ecma — some ES5 polyfils
  • strings — helpers for JS-strings
  • objects — helpers for JS-objects
  • functions — helpers for JS-functions
  • events — JS-events
  • querystring — helpers for work with querystring
  • tick — global timer
  • idle — IDLE event
  • next-tick — polyfill for nextTick/setTimeout(0, ...)
  • inherit — OOP helpers
  • jquery — jQuery
  • clearfix — CSS clearfix trick
  • identify — identify JS-objects
  • cookie — helpers for work with browser cookies
  • vow — Promises/A+ implementation
  • dom — helpers for work with DOM
  • loader — loader for JS files
  • ua — browser features detection
  • page — html/head/body scaffold

Technologies

  • vanilla.js + browser.js
  • bemhtml
  • bemtree

Changelog

You can check the changelog at the changelog page.

Migration

If you used BEM before, check the migration instructions.

Development

Working copy

  1. Get the needed version code (e.g., v1):
$ git clone -b v1 [email protected]:bem/bem-core.git
$ cd bem-core
  1. Install the dependencies:
$ npm install

You need export PATH=./node_modules/.bin:$PATH or an alternative way to run locally-installed bem-tools.

  1. Install all the necessary libraries with bem-tools:
$ bem make libs
  1. Build examples and tests:
$ bem make sets
  1. Run development server:
$ bem server

How to contribute

  1. Create an issue with a proper description.
  2. Decide which version needs your changes.
  3. Create a feature-branch with an issue number and a version (issues/<issue number>@v<version number>) based on a version branch. For example, for an issue #42 and a version #1: git checkout -b issues/42@v1 v1. If you need changes for several versions, each of them has to have a feature branch.
  4. Commit changes and push. Rebase your branch on a corresponding version branch if it's needed.
  5. Create a pull-request from your feature branch; or several pull-requests if you changed several versions.
  6. Link your pull request with an issue number any way you like. A comment will work perfectly.
  7. Wait for your pull request and the issue to be closed ;-)

Modular testing

A default test bundle for ecma_array: bem make common.sets/ecma__array.tests/default You can see the results of the tests in the terminal after the building process finishes. You can also watch them in a browser loading common.sets/ecma__array.tests/default/default.html.

Run tests for other BEM entities in the same way. This will work for those which are equiped with .test.js file.

Test are built with a bem-pr library. Check the [details](https://github.com/narqo/bem-pr/blob/master/docs/tests.ru.md] about testing infrastructure of the bem-pr library.

bem-core's People

Contributors

apostololeg avatar arikon avatar aristov avatar corpix avatar dfilatov avatar diunko avatar ikokostya avatar indutny avatar ingdir avatar lesanra avatar maslinych avatar mdidkivskyi avatar mishaberezin avatar mishanga avatar mursya avatar salivan avatar tadatuta avatar varya avatar veged avatar vithar avatar yurich avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.