Skip to content

Instantly share code, notes, and snippets.

@clarkf
Created August 12, 2012 18:04
Show Gist options
  • Select an option

  • Save clarkf/3333484 to your computer and use it in GitHub Desktop.

Select an option

Save clarkf/3333484 to your computer and use it in GitHub Desktop.
$ ./node_modules/.bin/r.js -o name=../node_modules/almond/almond baseUrl=client include=main wrap=true optimize=none out=dist/dist.js
Tracing dependencies for: ../node_modules/almond/almond
Error: ENOENT, no such file or directory './client/underscore.js'
In module tree:
main
Error: ENOENT, no such file or directory './client/underscore.js'
In module tree:
main
at Object.fs.openSync (fs.js:338:18)
requirejs.config({
paths: {
'jquery': 'support/jquery',
'underscore': 'support/underscore',
'backbone': 'support/backbone'
},
shim: {
'backbone': {
deps: ['underscore', 'jquery'],
exports: "Backbone"
},
'underscore': {
exports: "_"
}
}
});
define(['underscore', 'backbone'], function (_, Backbone) {
//Sup
console.log(Backbone);
console.log(_);
});
client/
support/
backbone.js
underscore.js
jquery.js
main.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment