Skip to content
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

Ship a compatible version of require.js under sdk/lib/dev_compiler/amd #29140

Closed
jakemac53 opened this issue Mar 22, 2017 · 5 comments
Closed
Assignees
Milestone

Comments

@jakemac53
Copy link
Contributor

When compiling ddc using amd modules (the first strategy I am targeting right now), users currently need to grab their own copy of require.js or point at a cdn.

I propose that we ship a compatible version with the sdk, and then the transformer will copy that file next to your entry point script and edit your html to go from:

<script type="application/dart" src="main.dart"></script>
to
<script data-main="main.dart" src="require.js"></script>

@jakemac53
Copy link
Contributor Author

cc @kevmoo @jmesserly

@jmesserly
Copy link

seems reasonable to me 👍

@vsmenon
Copy link
Member

vsmenon commented Mar 22, 2017

We probably need to:

[] add requirejs github to DEPS or download the built file as part of gclient runhooks
[] copy it alongside amd/dart_sdk.js into the built sdk as part of the build process
[] update whatever license we need to appropriately

@whesse - that sound right?

@whesse
Copy link
Contributor

whesse commented Mar 22, 2017 via email

@vsmenon
Copy link
Member

vsmenon commented Mar 22, 2017

Thanks, this is the relevant wiki page:

https://github.com/dart-lang/sdk/wiki/Adding-and-Updating-Dependencies

@kevmoo kevmoo added this to the 1.24 milestone Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants