Skip to content

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sprilukin
Copy link

Here is what is basically want to see for issue #32
No cmd line 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) {
Copy link
Collaborator

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep ))

Copy link
Author

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, "") : "";
Copy link
Collaborator

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.

@jazzzz
Copy link
Collaborator

jazzzz commented Feb 23, 2016

@sprilukin can you document the new option?

@sprilukin
Copy link
Author

@jazzzz, done could you please check whether it's enough good option description?

@sprilukin
Copy link
Author

@jazzzz including cmd line support for this feature will introduce dependency on some cmd line helper library, so it will require more work...
I hope that part of work could be done in a separate PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants