Skip to content

Instantly share code, notes, and snippets.

@wookiehangover
Created January 17, 2014 22:38
Show Gist options
  • Save wookiehangover/8482989 to your computer and use it in GitHub Desktop.
Save wookiehangover/8482989 to your computer and use it in GitHub Desktop.
config =
requirejs:
options:
mainConfigFile: 'some/path/to/your/config.js'
baseUrl: 'some/path/to/your/assets'
almond: true
optimize: 'uglify2'
wrap: false
findNestedDependencies: true,
preserveLicenseComments: false
generateSourceMaps: true,
main:
options:
include: ["main"]
out: 'some/path/to/your/builds/app.js'
module.exports = (grunt) ->
grunt.initConfig( config )
grunt.loadNpmTasks('grunt-requirejs')
// Break out the application running from the configuration definition to
// assist with testing.
require(['config'], function(){
require(['app/controllers/application_controller'], function(ApplicationController){
new ApplicationController();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment