Skip to content

kiki-le-singe/marionette-boilerplate

Repository files navigation

Marionette Boilerplate

Build Status

Introduction

This project is first to train with tools like GruntJS, Yeoman, Backbone.js, Marionette.js... And then I used it as Boilerplate.

Requirements

Optional

Installation

  • $ git clone git@github.com:kiki-le-singe/marionette-boilerplate.git
  • $ cd marionette-boilerplate
  • $ npm install
  • $ bower install

Grunt tasks

  • $ grunt serve

Then serve the app on localhost:9000 and opens your default browser

  • $ grunt serve --stub

Makes the same thing that the above command, except that the 'stub' option allows to enabled or not the retrieving of fake datas.

  • $ grunt test

Coming soon...

  • $ grunt dist

Build the application in /dist.

  • $ grunt build

Create a .tgz archive named marionette-boilerplate-[version].

  • $ grunt docs

Generates a html doc of your documented code in /docs and open it in your browser.

  • $ grunt plato

Generate complexity analysis reports in /reports with plato.

  • $ grunt changelog

Generate a markdown changelog from git commit data. grunt-conventional-changelog.

Gulp tasks

  • $ gulp serve

Then serve the app on localhost:3000 and opens your default browser

  • $ gulp serve --stub

Makes the same thing that the above command, except that the 'stub' option allows to enabled or not the retrieving of fake datas.

  • $ gulp test

Runs tests located in /test/spec.

You can to use the karma start command. It is useful for debug mode.

  • $ gulp dist

Build the application in /dist.

  • $ gulp build

Create a .zip archive named marionette-boilerplate-[version].

  • $ gulp docs

Coming soon...

  • $ gulp plato

Coming soon...

  • $ gulp changelog

Coming soon...

Included JavaScript libraries

Why to use Backbone.wreqr and Backbone.radio? Marionette require Backbone.wreqr for internal use only and I use Backbone.radio instead of Backbone.wreqr in my boilerplate but it's not mandatory.

CSS Framework

The use of Foundation is not mandatory. But if you want used another Framework, don't forget to change gulp/grunt sass task, remove the Foundation initialization in app/scripts/[init, index].js and in [main|settings].scss files.

API

By default the root access for the API is http://localhost:9000/api. Available example: http://localhost:9000/api/libraries

Tests

The library used for tests are :

App configuration

The configuration of the application is located in /app/scripts/config and therefore by convention in each modules /app/scripts/modules/*/config

Handlebars helpers

Handlebars helpers is located in /app/scripts/helpers

Sources

Tips and tricks

  • mongo-express: If you use MongoDB, look at this node modules. It's an convenient admin interface for MongoDB.