Skip to content

Instantly share code, notes, and snippets.

@phamann
Created October 25, 2013 07:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phamann/7150967 to your computer and use it in GitHub Desktop.
Save phamann/7150967 to your computer and use it in GitHub Desktop.
RequireJS example
requirejs: {
options: {
baseUrl: "common/app/assets/javascripts",
paths: {
"bean": "components/bean/bean",
"bonzo": "components/bonzo/src/bonzo",
"domReady": "components/domready/ready",
"EventEmitter": "components/eventEmitter/EventEmitter",
"qwery": "components/qwery/mobile/qwery-mobile",
"reqwest": "components/reqwest/src/reqwest",
"domwrite": "components/dom-write/dom-write",
"swipe": "components/swipe/swipe",
"swipeview": "components/swipeview/src/swipeview"
},
optimize: (isDev) ? 'none' : 'uglify2',
useSourceUrl: (isDev) ? true : false,
preserveLicenseComments: false
},
core: {
name: "bootstraps/app",
out: "static/target/compiled/javascripts/bootstraps/app.js",
"wrap" : {
"startFile": "common/app/assets/javascripts/components/curl/dist/curl-with-js-and-domReady/curl.js",
"endFile": "common/app/assets/javascripts/bootstraps/go.js"
}
},
discussion: {
name: "modules/discussion/discussion",
out: "static/target/compiled/javascripts/modules/discussion.js",
exclude: [
'common',
'bonzo',
'qwery',
'bean',
'ajax',
'modules/userPrefs',
'modules/analytics/clickstream',
'modules/inview',
'modules/detect',
'modules/id'
]
}
},
@commuterjoy
Copy link

Ooh, yeah - that's neat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment