UNPKG

curl-amd

Version:

curl.js is small, fast, extensible module loader that handles AMD, CommonJS Modules/1.1, CSS, HTML/text, and legacy scripts.

50 lines (39 loc) 795 B
<!DOCTYPE HTML> <html> <head> <title>js! plugin !test option</title> <script> curl = { paths: { curl: '../src/curl', 'plain_old.js': 'stuff/plain_old.js' }, pluginPath: 'curl/plugin' }; </script> <script src="../src/curl.js" type="text/javascript"></script> <script type="text/javascript"> curl( [ 'js!plain_old.js!order', 'js!stuff/plain_old_2.js?foo!order!exports=testDomain.awesome.sauce', 'domReady!' ] ).then( function () { write('SUCCESS: test for global variable succeeded'); }, function () { write('FAILED: test for global variable failed'); } ); function write (msg) { curl(['domReady!'], function () { document.body.appendChild(document.createElement('div')).innerHTML = msg; }) } </script> </head> <body> </body> </html>