Make sure you have the following dependencies installed:
- Node (I recommend version 0.10.x,
node -v
to check what you have installed). You will also need NPM, which comes with Node.
To get the development workflow up and running follow these steps:
git clone
the repositorycd marionette-template
- Run
npm install
. This will install all of the dependencies. - Run
gulp watch
. This will start listening for changes to the javascript and sass files, dynamically recompiling them as necessary. http-server
. This will start a server on port 8080 that is serving the files in thepublic
folder. You can now see the running client by visitinglocalhost:8080
.
- The application framework is Marionette on top of Backbone.
- Automation is handled by gulp.
- Javascript builds are done through browserify.
- ES6 is converted to browser-friendly JS by babel.
- Templates are written in Jade.
- Stylesheets are written in Sass.
- Base-styling is provided by Bootstrap.
/app
- everything that runs in the browser
/app/main.js
- the script that buts up the application, initializes any necessary singletons, and starts the router.
/app/router.js
- the router that defines the mapping between urls and views.
/app/<resource_type>
- directory containing everything related to a given resource: views, templates, routes, models, stores, and styles.
/app/<resource_type>/<route_name>
- directory containing everything related to a give route: the view, the template, the styles.