-
Notifications
You must be signed in to change notification settings - Fork 45
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
Update README.md #35
Update README.md #35
Conversation
Fixed typemoq.js URL. Removed unnecessary tsconfig.json instruction.
Thanks. About the |
It means that smth is wrong with your build. In which case do you get the error? |
As for me it looks good. https://jsfiddle.net/dizel3d/m113qxbp/ |
Afaik the So for module Only |
Why do you do |
<script src="lodash"></script>
<script src="typemoq"></script>
<script>
TypeMoq.Mock.ofInstance(...)...
</script>
<script src="requirejs"></script>
<script>
requirejs(['typemoq'], TypeMoq => {
TypeMoq.Mock.ofInstance(...)...
});
// or
requirejs(['myTest']);
</script> where module import * as TypeMoq from "typemoq"
TypeMoq.Mock.ofInstance(...)...
import * as TypeMoq from "typemoq"
TypeMoq.Mock.ofInstance(...)... |
Yes, the right way to use it in a browser would be without the import form, but I don't think it's possible, at least for the moment. Solving #25 would require TS to allow commonjs module concatenation and also to bundle up the type definitions. So I used rollup for module concatenation to umd and dts-bundle for type def concat.
which is usable only with the import form
To be able to use typemoq in the browser without the import form, bundle-dts had to be able to output smth like:
|
|
Thanks for the tip, I'm going to try it when I have some time. In the meantime, a PR (this one or a new one) with the proposed changes to typemoq would be welcomed. |
Yes, you're right. I think, global module is a rare use-case. Therefore don't waste your time to fix it. :-) |
It's not broken, just limited to UMD for the global module :) I've fixed the broken url with this commit 730646c Closing this. |
Fixed typemoq.js URL.
Removed unnecessary tsconfig.json instruction.