-
Notifications
You must be signed in to change notification settings - Fork 27
Ability to pass amd dependencies to a define part. #33
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
base: master
Are you sure you want to change the base?
Conversation
…support for passing dependencies added yet.
@@ -76,3 +76,15 @@ function compileNamespaceStep(name) { | |||
name = camelCase(name); | |||
return 'g=(g.' + name + '||(g.' + name + ' = {}))'; | |||
} | |||
|
|||
function getDependencies(dependencies) { |
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.
@sprilukin Isn't this function essentially doing JSON.stringify()
, without the brackets?
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.
yep ))
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.
@jazzzz, fixed.
@@ -76,3 +78,7 @@ function compileNamespaceStep(name) { | |||
name = camelCase(name); | |||
return 'g=(g.' + name + '||(g.' + name + ' = {}))'; | |||
} | |||
|
|||
function getDependencies(dependencies) { | |||
return dependencies ? JSON.stringify(dependencies).replace(/^\[/g, "").replace(/]$/g, "") : ""; |
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.
@sprilukin You could just ensure that dependencies
is an array, keep the brackets, and replace [deps()]
with deps()
in template.js.
@sprilukin can you document the new option? |
@jazzzz, done could you please check whether it's enough good option description? |
@jazzzz including cmd line support for this feature will introduce dependency on some cmd line helper library, so it will require more work... |
Here is what is basically want to see for issue #32
No cmd line support for passing dependencies added yet.