Skip to content

baby-loris/baby-bem

Repository files navigation

baby-bem

In this project you can see example of using our tools and approaches.

Requirements

Quick start

bash <(curl -s https://raw.githubusercontent.com/baby-loris/baby-bem/master/get-a-pet.sh)
cd <YOUR_PROJECT_NAME>
npm install
SOCKET=8080 npm start

Then open the link in your favorite browser:

http://localhost:8080/

Note. The application uses socket /tmp/{{dirname}}-{{username}}.socket by default. Don't forget set up your nginx config properly.

What's inside?

Features

Methodologies, libraries, and frameworks

  • BEM — a Block-Element-Modifier methodology for developing frontend
  • bh — a templates engine for BEM methodology
  • ym — a modules system
  • express — a web application framework for node
  • vow — the fastest Promise/A+ implementation

Tools

  • enb — the fastest builder for BEM projects
  • jshint — a tool to detect errors and potential problems in JavaScript code
  • jscs — a code style checker for javascript
  • git-hooks — a tool for git hooks managment
  • mocha + chai + sinon + phantomjs — testing client javascript

How it works

Project structure

.enb                ENB config for building project
.git-hooks          Git hooks
configs             Project configs
client              Client-side code
client/common       Common blocks
client/demo         Demo blocks
pages               Pages
tests               Tests
tests/client        Client tests
tests/server        Server tests

How to develop?

Remove demo data

Remove demo level from file system.

rm -rf client/demo

and from .enb/make.js.

Build project and run enb server

npm start

Use SOCKET environment variable to change default SOCKET. For example, to run on port 8080 you should

SOCKET=8080 npm start

Static code analyser and codestyle checking

npm run lint

Run tests

Client-side tests:

npm run test-client

or run npm start, then open in your favorite browser:

http://localhost:8080/tests/client/index.html

Server-side tests:

npm run test-server

Run all tests:

npm test

Contribution

About

Project stub for BEM projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •