Starter Template for a Laravel, RequireJS and Backbone application, using Bower.
PHP JavaScript Other
Switch branches/tags
Nothing to show
Pull request Compare This branch is 2 commits ahead, 2 commits behind NETTUTS:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
application
bundles
laravel
public-dev
storage
.bowerrc
.gitignore
CONTRIBUTING.md
artisan
component.json
license.txt
paths.php
readme.md

readme.md

Setup

First, of course, download this repo. Then, from the Terminal (assuming Node.js installed), install RequireJS and Bower (for dependency management) globally if they aren't already.

npm install -g bower requirejs

Let's now install the dependencies for this project. I'm assuming that we're building a Backbone project, so I've listed RequireJS, jQuery, Underscore, and Backbone as dependencies.

bower install

Please note that we're using the AMD versions of both Backbone and Underscore to make the setup process as easy as possible.

When ready to build the project, run:

build/build.sh

this will create a new dist directory, copy the files over, run the r.js optimizer on assets, and clean it the file structure a bit for production. Refer to app.build.jsfor configuration options.

CSS Imports

If you're not using a preprocessor, feel free to modularize your stylesheets, and @import them into a master stylesheet. During the build process, r.js will merge these files together, so that you don't have to deal with any performance hits from using @import.