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

Add wrapper for AMDJS, CommonJS and browser modules #224

Closed
wants to merge 1 commit into from

Conversation

prantlf
Copy link
Contributor

@prantlf prantlf commented Mar 8, 2015

Adds wrapping factory function recognizing the three environments and plugging the mockjax into jQuery accordingly.

Includes just this change an no other refactoring.

Uses the universal module pattern and the name 'jquery' for the jQuery module dependency.

Use the pattern from https://github.com/umdjs/umd
Use 'jquery' module dependency for jQuery.
@jakerella
Copy link
Owner

Thanks for taking this, unfortunately this is on the roadmap for 2.0.0 and won't be implemented in the 1.x branch. Ca you do this work on the v2 branch and send a PR for that? We also need to be sure to run this with all current tests (which use the <script> inclusion method) and then create tests for the other forms of importing (CommonJS and AMD).

@prantlf
Copy link
Contributor Author

prantlf commented Mar 11, 2015

You're welcome. I'll create another PR for the v2 branch. The current tests run "green". I'll try adding loading tests too when the time permits.

@prantlf
Copy link
Contributor Author

prantlf commented Mar 16, 2015

I created #229 with this change against the v2 branch. Another PR - #230 - contains init tests for AMD using Require.js. Yet another PR - #231 - tests the CommonJS interface in Node.js. This PR can be probably closed.

@jakerella
Copy link
Owner

Closing this issue for now. We will not be integrating AMD/UMD into the 1.x branch.

@jakerella jakerella closed this Mar 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants