Permalink
Browse files

merge dev branch

  • Loading branch information...
unscriptable committed Feb 5, 2012
2 parents 39872f4 + 36a54bb commit d761061cac565063cc74a09d1d778c14d3d83c1c
Showing with 4,510 additions and 13,288 deletions.
  1. +1 −1 LICENSE.txt
  2. +28 −9 README.md
  3. +2 −2 bin/make-all.sh
  4. +2 −0 bin/make.sh
  5. +13 −8 dist/README.md
  6. +18 −16 dist/curl-for-dojo1.6/curl.js
  7. +21 −19 dist/curl-for-jQuery/curl.js
  8. +32 −29 dist/curl-kitchen-sink/curl.js
  9. +21 −17 dist/curl-with-js-and-domReady/curl.js
  10. +15 −12 dist/curl/curl.js
  11. +739 −568 src/curl.js
  12. +0 −10 src/curl/builder/text.sh
  13. +52 −30 src/curl/debug.js
  14. +0 −88 src/curl/dojo16Compat.js
  15. +7 −4 src/curl/domReady.js
  16. +120 −0 src/curl/loader/cjsm11.js
  17. +22 −0 src/curl/plugin/README.md
  18. +9 −2 src/curl/plugin/async.js
  19. +76 −0 src/curl/plugin/builder/css.js
  20. +56 −0 src/curl/plugin/builder/text.js
  21. +10 −44 src/curl/plugin/css.js
  22. +8 −1 src/curl/plugin/domReady.js
  23. +17 −2 src/curl/plugin/i18n.js
  24. +88 −55 src/curl/plugin/js.js
  25. +12 −1 src/curl/plugin/link.js
  26. +16 −44 src/curl/plugin/text.js
  27. +56 −0 src/curl/shim/dojo16.js
  28. +0 −16 test/apiName.html
  29. +70 −0 test/cjsModules1.1.html
  30. +5 −18 test/{commonJsModules1.1.html → cjsm1.1-prewrapped.html}
  31. +0 −62 test/commonJsModules1.1-compiled.html
  32. +3 −3 test/commonJsPackages1.1.html
  33. +73 −0 test/cycle-correction-hybrid.html
  34. +56 −0 test/cycle-detection.html
  35. +0 −12,026 test/domReady-compiled.html
  36. +1 −1 test/domReady.html
  37. +7 −2 test/issue20.html
  38. +71 −0 test/issue28.html
  39. +45 −0 test/issue34.html
  40. +48 −0 test/issue37.html
  41. +48 −0 test/issue53.html
  42. +61 −0 test/jquery-ready.html
  43. +56 −0 test/js-load-once-issue30.html
  44. +1 −1 test/js-test-option-failure.html
  45. +1 −15 test/js-test-option-success.html
  46. +0 −58 test/link-compiled.html
  47. +28 −8 test/{basic-compiled.html → next.html}
  48. +65 −0 test/package-specific-config.html
  49. +0 −65 test/plainOldJs-compiled.html
  50. +8 −23 test/plainOldJs.html
  51. +4 −3 test/plugin-specific-paths.html
  52. +17 −20 test/pluginConfig.html
  53. +61 −0 test/preload.html
  54. +52 −0 test/relative-plugins.html
  55. +46 −0 test/simple-plugin.html
  56. +17 −0 test/stuff/aView/controller.js
  57. +3 −0 test/stuff/aView/css.css
  58. +1 −0 test/stuff/aView/template.html
  59. +3 −0 test/stuff/css-on-cdn.js
  60. +3 −0 test/stuff/issue53.js
  61. +1 −0 test/stuff/random.js
  62. +1 −2 test/support/commonjs/exports.js
  63. +6 −0 test/support/commonjs/hybrid.js
  64. +16 −0 test/support/commonjs/loop/hybrid-loop1.js
  65. +16 −0 test/support/commonjs/loop/hybrid-loop2.js
  66. +16 −0 test/support/commonjs/loop/hybrid-loop3.js
  67. +1 −1 test/support/commonjs/module.js
  68. +4 −0 test/support/commonjs/nakedDependentCjsm1.1.js
  69. +4 −0 test/support/commonjs/nakedSimpleCjsm1.1.js
  70. +5 −1 test/support/commonjs/this.js
  71. +1 −1 test/support/fake.js
  72. +3 −0 test/support/loop/loop-start.js
  73. +3 −0 test/support/loop/loop1.js
  74. +3 −0 test/support/loop/loop2.js
  75. +3 −0 test/support/loop/loop3.js
  76. +8 −0 test/support/simple-plugin.js
  77. +1,005 −0 test/support/underscore-amdjs-1.3.1/underscore-orig.js
  78. +1,008 −0 test/support/underscore-amdjs-1.3.1/underscore.js
  79. +58 −0 test/top-level-plugin.html
  80. +53 −0 test/underscore.html
View
@@ -2,7 +2,7 @@ Open Source Initiative OSI - The MIT License
http://www.opensource.org/licenses/mit-license.php
-Copyright (c) 2011 unscriptable.com / John Hann
+Copyright (c) 2012 Brian Cavalier and John Hann
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
@@ -1,7 +1,7 @@
curl (cujo resource loader)
=====================
-version 0.5.4
+version 0.6
See the [wiki](https://github.com/cujojs/curl/wiki) for information about using curl.js with jQuery.
@@ -19,8 +19,28 @@ Helpful link for updating submodules:
What's New?
=======
+* 0.6
+ * works with underscore fork at [amdjs](https://github.com/amdjs/underscore)
+ * tested and works with dojo 1.7.1 (using curl/shim/dojo16 as a preload)
+ * allows normal, non-AMD js files to return values to AMD modules (!exports
+ option)
+ * unwrapped CommonJS Modules/1.1 compatibility (experimental)
+ * non-AMD module loading via moduleLoader config property
+ * updated to latest AMD plugin specifications
+ * preloads config array to ensure shims (or other modules) are loaded
+ first
+ * package-specific configurations
+ * avoids circular dependencies when using cjsm modules
+ * folder reorganization. shims were moved into their own folder
+ * many bugs fixed, including #21, #22, #28, #34, #36, #39, #40
* 0.5.4
+ * jQuery 1.7 support!!!
* curl.js indicates to jQuery that it is a jQuery-aware AMD loader (#31)
+ * AMD/CJSM Hybrid format (see Manual Conversion section of this
+ page: http://requirejs.org/docs/commonjs.html)
+ * Now supports node's module.exports = x; export model
+ * bug fixes:
+ * multiple .next() calls now pass variables correctly
* curl.js now ignores blank or falsy module ids for better compatibility
wth yepnope and has! (#32)
* 0.5.3
@@ -57,10 +77,9 @@ What's New?
TODO:
-* configuration options per package
-* finish i18n plugin (eta: September)
-* create dojo 1.6 tests
-* document plugin configuration options and how to use plugins
+* finish i18n plugin!
+* create dojo 1.7 shim, if necessary
+* document plugin configuration options and how to use each plugin
* notes about using JSONP (it works for objects, arrays, functions, numbers
and strings! use ?callback=define)
@@ -143,7 +162,7 @@ Promises-based API for executing callbacks.
* ['dep1', 'dep2', 'dep3']: Module names or plugin-prefixed resource files
* callback: Function to receive modules or resources
* errorback: Function to call if an exception occurred while loading
-* For full CommonJS Promises/A compliance, use [when.js](https://github.com/briancavalier/when.js)
+* For full CommonJS Promises/A compliance, use [when.js](https://github.com/cujojs/when)
* `when(curl(['dep1']).then(callback);`
---------
@@ -735,9 +754,9 @@ out of cujo.js. Our goal is to make the advanced concepts in cujo.js more
palatable by breaking them down into easier-to-grok chunks. Other cujo.js
libs include:
-* [canhaz](https://github.com/briancavalier/canhaz): a project and code bootstrapping tool that will save you tons of typing.
-* [wire](https://github.com/briancavalier/wire): A light, fast, flexible Javascript IOC container
-* [when.js](https://github.com/briancavalier/when.js): A small, fast Promises/A compliant promises implementation
+* [canhaz](https://github.com/cujojs/canhaz): a project and code bootstrapping tool that will save you tons of typing.
+* [wire](https://github.com/cujojs/wire): A light, fast, flexible Javascript IOC container
+* [when.js](https://github.com/cujojs/when): A small, fast Promises/A compliant promises implementation
* [cram](https://github.com/cujojs/cram): a javascript compressor, concatenator, and optimizer meant to be used with curl.js
Kudos
View
@@ -4,6 +4,6 @@
# make other versions of curl
./make.sh ../dist/curl-with-js-and-domReady/curl.js ../src/curl.js ../src/curl/domReady.js ../src/curl/plugin/js.js ../src/curl/plugin/domReady.js
-./make.sh ../dist/curl-for-dojo1.6/curl.js ../src/curl.js ../src/curl/domReady.js ../src/curl/dojo16Compat.js ../src/curl/plugin/domReady.js
-./make.sh ../dist/curl-kitchen-sink/curl.js ../src/curl.js ../src/curl/domReady.js ../src/curl/dojo16Compat.js ../src/curl/plugin/js.js ../src/curl/plugin/text.js ../src/curl/plugin/async.js ../src/curl/plugin/css.js ../src/curl/plugin/domReady.js
+./make.sh ../dist/curl-for-dojo1.6/curl.js ../src/curl.js ../src/curl/domReady.js ../src/curl/shim/dojo16.js ../src/curl/plugin/domReady.js
+./make.sh ../dist/curl-kitchen-sink/curl.js ../src/curl.js ../src/curl/domReady.js ../src/curl/shim/dojo16.js ../src/curl/plugin/js.js ../src/curl/plugin/text.js ../src/curl/plugin/async.js ../src/curl/plugin/css.js ../src/curl/plugin/link.js ../src/curl/plugin/domReady.js ../src/curl/loader/cjsm11.js
./make.sh ../dist/curl-for-jQuery/curl.js ../src/curl.js ../src/curl/domReady.js ../src/curl/plugin/js.js ../src/curl/plugin/link.js ../src/curl/plugin/domReady.js
View
@@ -6,6 +6,8 @@ tmpfile=$(mktemp -t cram.XXXXXX)
# use all of the remaining parameters as files to be concatenated
shift
+echo "making $out"
+
# concatenate all of the files to a temp file
cat $@ | sed -e "s:\/\*==::g" -e "s:==\*\/::g" > "$tmpfile"
View
@@ -3,22 +3,25 @@ Distribution Files
These are the "compiled" versions of curl.js.
-Use curl/curl.js if you are only loading AMD-formatted javascript modules and
-AMD loader plugins.
+Use curl/curl.js if you are only loading AMD-formatted javascript modules.
Use curl-with-js-and-domReady/curl.js if you wish to use non-AMD javascript
files and don't have an alternative domReady implementation handy.
-Use curl-for-jQuery for a version of curl that has the js!, domReady!, and
-link! plugins. This is an adequate configuration for many simple jQuery
-projects (and some sophisticated ones, too).
+Use curl-for-jQuery1.7 for a version of curl that has instructions for
+jQuery 1.7 to register as an AMD module and has the js! and link! plugins
+built in. This is an adequate configuration for many simple jQuery projects
+(and some sophisticated ones, too).
+
+curl-for-dojo1.6 has the domReady! plugin built in as well as some
+compatibility shims for dojo 1.6 (which isn't officially AMD-ready).
You can build your own custom version of curl.js by using the `make.sh` script
in the /bin/ folder. You must run it from the /bin/ folder. Syntax:
./make.sh destination/curl.js ../src/curl.js [files to concat into curl.js]
-The following files can be concatenated into curl.js:
+The following files can be concatenated into curl.js using make.sh:
* ../src/curl/plugin/js.js (the js! plugin)
* ../src/curl/plugin/text.js (the text! plugin)
@@ -27,7 +30,9 @@ The following files can be concatenated into curl.js:
* ../src/curl/plugin/link.js (the link! plugin)
* ../src/curl/plugin/domReady.js (the domReady plugin)
* ../src/curl/domReady.js (the domReady module)
-* ../src/curl/dojo16Compat.js (the dojo 1.6 compatibility shim / module)
+* ../src/curl/shim/dojo16.js (the dojo 1.6 compatibility shim / module)
+* ../src/curl/shim/underscore.js (the underscore compatibility shim / module)
+* ../src/curl/loader/cjsm11.js (the CommonJS Modules/1.1 compatibility shim / module)
* Any named AMD module (does not support anonymous modules, yet!)
* Any non-AMD javascript file
@@ -36,4 +41,4 @@ For example, to make a version of curl with the js! and text! plugins built-in:
./make.sh destination/curl.js ../src/curl.js ../src/curl/plugin/js.js ../src/curl/plugin/text.js
Note: you will need a fairly recent version of `curl` (the unix utility, not
-curl.js) to run `make.sh`. Version 7.18 or later is fine.
+curl.js!) to run `make.sh`. Version 7.18 or later is fine.
Oops, something went wrong.

0 comments on commit d761061

Please sign in to comment.