-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support AMD #111
Support AMD #111
Conversation
ParameterMissing:: = new Error() | ||
defaults = | ||
prefix: "PREFIX" | ||
defaultUrlOptions: DEFAULT_URL_OPTIONS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like you've changed API here. As I remember JsRoutes.defaults
is accessible and they are no longer backward compatible.
General question: Can we avoid a reindenting of entire file - it makes blame history unaccessible. So I would want to avoid that if possible. |
Results: http://jsfiddle.net/8G5yW/2/ Files: <script data-main="https://dl.dropboxusercontent.com/u/930565/js-routes/main.js" src="http://requirejs.org/docs/release/2.1.11/minified/require.js"></script> In main we have config: require.config({
paths: {
"js-routes": "https://dl.dropboxusercontent.com/u/930565/js-routes/routes"
},
shim: {
"js-routes": {
exports: "Routes"
}
}
});
require(["js-routes"], function(r) {
alert([Routes.edit_inbox_message_path("cool", "route"), r.edit_inbox_message_path("cool", "route")].join(" == "));
}); And see this alert :) Files: |
// cc @bogdan