Skip to content

tkissing/reqwirejs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReqwireJS

ReqwireJS is a patched version of RequireJS with additions taken from rewire. It implements a (mostly) RequireJS-compatible API and is designed to to help test AMD modules.

By using ReqwireJS you can __get()__ and __set()__ variables declared at the top level of your module that are not being exported.

Limitations

Your modules need to be written in CommonJS syntax, using module.exports so ReqwireJS can find the right place in the code to inject it's /magic/. I hope to remove this restriction at some point, but don't hold your breath.

Why is the filename still require.js?

So I can run the unit tests for RequireJS against the ReqwireJS without having to patch them.

About

A file and module loader for JavaScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 92.8%
  • JavaScript 7.2%