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) 702 B
<!DOCTYPE HTML> <html> <head> <title>apiName/apiContext curl test file</title> <script> foo = {}; curl = { apiName: 'require', paths: { curl: '../src/curl/' } }; </script> <script src="../src/curl.js" type="text/javascript"></script> </head> <body> </body> <script type="text/javascript"> //var contextifiedCurl = require; if(typeof require !== 'function') { write('FAILED: api context require'); } else { require( [ 'stuff/three', 'domReady!' ] ).then( function (three) { write('SUCCESS: api context is foo.bar'); } ); } function write (msg) { document.body.appendChild(document.createElement('div')).innerHTML = msg; } </script> </html>