Skip to content

Instantly share code, notes, and snippets.

@jayhjkwon
Last active December 17, 2015 19:30
Show Gist options
  • Save jayhjkwon/5661299 to your computer and use it in GitHub Desktop.
Save jayhjkwon/5661299 to your computer and use it in GitHub Desktop.
Configuration for requirejs with Marionette and Handlebars template
require.config({
baseUrl: './javascripts',
paths: {
jquery : '../components/jquery/jquery',
domReady : '../components/requirejs-domready/domReady',
underscore : '../components/underscore/underscore',
backbone : '../components/backbone/backbone',
marionette : '../components/marionette/lib/backbone.marionette',
handlebars : '../components/handlebars.js/dist/handlebars',
hbs : '../components/require-handlebars-plugin/hbs',
i18nprecompile : '../components/require-handlebars-plugin/hbs/i18nprecompile',
json2 : '../components/require-handlebars-plugin/hbs/json2'
},
shim: {
underscore: {
exports: '_'
},
backbone: {
deps: ['underscore', 'jquery'],
exports: 'Backbone'
},
marionette: {
deps: ['jquery', 'underscore', 'backbone'],
exports: 'Marionette'
},
handlebars: {
exports: 'Handlebars'
}
},
hbs : {
templateExtension : 'hbs',
disableI18n : true
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment