Skeleton for Backbone.Marionette based application
This simple application includes Backbone.js/Marionette.js frameworks and ES6/Gulp/Browserify technologies.
Dependencies
List of all dependencies is presented here
Install
OSX
Install Node.js
Via brew:
brew install node
Via nvm:
brew install nvm
nvm install node
nvm alias default node
Quick start
Clone application as new project with original repository named "backbone-base"
git clone git@github.com:fs/backbone-base.git --origin backbone-base [MY-NEW-PROJECT]
Create your new repo on GitHub and push master into it. Make sure master branch is tracking origin repo.
git remote add origin git@github.com:[MY-GITHUB-ACCOUNT]/[MY-NEW-PROJECT].git
git push -u origin master
Run bootstrap script
bin/setup
Run application
Run app (by default environment is 'development', mode is 'mock', port is 8000)
gulp
Run app with options
[<options>] gulp
NODE_ENV=development # build app with development environment
NODE_ENV=production # build app with production environment
NODE_ENV=test # build app with test environment
MODE=mock # run app with mock server
MODE=api # run app with remote API server
PORT=8000 # run server on 8000 port
Start to use application on browser:
localhost:8000
Code linting tasks
Run javascript linter
gulp eslint
Run json linter
gulp jsonlint
Run stylesheets linter
gulp stylelint
Test tasks
Run unit tests
gulp karma
Run e2e tests
gulp e2e
Run linters
gulp lint
Run all tests and linters
gulp test
Integrate with Rails API
Application easy integrates with Rails base API.
Note: you should switch off the Active Model Serializer adapter in your Rails application to avoid problems with root element
Credits
Backbone Base is maintained by Marat Fakhreev. It was written by Flatstack with the help of our contributors.