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.
- Static code analyser and codestyle checking with jsint and jscs
- Unit tests with mocha and phantomjs
- Using git hooks to lint your code and run tests before each commit
- 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
- 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
.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
Remove demo level from file system.
rm -rf client/demo
and from .enb/make.js
.
npm start
Use SOCKET
environment variable to change default SOCKET. For example, to run on port 8080
you should
SOCKET=8080 npm start
npm run lint
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