Skip to content
Newer
Older
100644 772 lines (603 sloc) 26.4 KB
f06405b updated README to reflect latest features and API
unscriptable authored Jul 20, 2011
1 curl (cujo resource loader)
e14209e clarified README
John Hann authored Feb 17, 2011
2 =====================
fccc4e9 the start of a README
unscriptable authored Feb 6, 2011
3
885b629 more updates for 0.
unscriptable authored Jan 9, 2012
4 version 0.6
20fbf55 added notes about CommonJS Modules 1.1 support
unscriptable authored Mar 31, 2011
5
24e03a0 @unscriptable fixed urls to point to cujojs repos instead of unscriptable repos
unscriptable authored Jan 22, 2012
6 See the [wiki](https://github.com/cujojs/curl/wiki) for information about using curl.js with jQuery.
20fbf55 added notes about CommonJS Modules 1.1 support
unscriptable authored Apr 1, 2011
7
ec37dca added notes about repo move
unscriptable authored Jan 17, 2012
8 Please Note: this project has moved from unscriptable/curl to cujojs/curl.
9 Any existing forks have been automatically moved to cujojs/curl. However,
10 you will need to update your clone and submodule remotes manually.
11
12 Update the url in your .git/config, and also .gitmodules for submodules:
13 git://github.com/cujojs/curl.git
14 https://cujojs@github.com/cujojs/curl.git
15
16 Helpful link for updating submodules:
17 [Git Submodules: Adding, Using, Removing, Updating](http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/)
18
4dab2d3 updated README to rev 0.5.4
unscriptable authored Nov 27, 2011
19 What's New?
62caf80 removed out-of-date comments committed at github
unscriptable authored Nov 27, 2011
20 =======
9ea4aa2 add note about jQuery 1.7 compatibility
John Hann authored Nov 4, 2011
21
885b629 more updates for 0.
unscriptable authored Jan 10, 2012
22 * 0.6
23 * updated to latest AMD plugin specifications
24 * underscore shim (curl/shim/underscore) that corrects underscore's
25 not-quite-right AMD implementation
c3b0d33 changed "preload" config property to "preloads" to be more consistent…
John Hann authored Jan 30, 2012
26 * preloads config array to ensure shims (or other modules) are loaded
885b629 more updates for 0.
unscriptable authored Jan 10, 2012
27 first
28 * CommonJS Modules/1.1 compatibility (experimental)
29 * non-AMD module loading via moduleLoader config property
30 * package-specific configuration, including paths
31 * folder reorganization. shims were moved into their own folder
32 * many bugs fixed, including #21, #22, #28, #34, #36, #39, #40
4dab2d3 updated README to rev 0.5.4
unscriptable authored Nov 27, 2011
33 * 0.5.4
07e2e80 added notes about 0.5.4
unscriptable authored Nov 9, 2011
34 * jQuery 1.7 support!!!
4dab2d3 updated README to rev 0.5.4
unscriptable authored Nov 27, 2011
35 * curl.js indicates to jQuery that it is a jQuery-aware AMD loader (#31)
07e2e80 added notes about 0.5.4
unscriptable authored Nov 10, 2011
36 * AMD/CJSM Hybrid format (see Manual Conversion section of this
37 page: http://requirejs.org/docs/commonjs.html)
38 * Now supports node's module.exports = x; export model
39 * bug fixes:
40 * multiple .next() calls now pass variables correctly
4dab2d3 updated README to rev 0.5.4
unscriptable authored Nov 27, 2011
41 * curl.js now ignores blank or falsy module ids for better compatibility
42 wth yepnope and has! (#32)
d8406eb bumped to 0.5.3
unscriptable authored Sep 24, 2011
43 * 0.5.3
44 * fix to js! plugin (now works without !order option)
1eaeebf added release notes to README
unscriptable authored Aug 23, 2011
45 * 0.5.2
11267dc updated to 0.5.2
unscriptable authored Sep 3, 2011
46 * better CDN support!
49b5d1b many updates to current specs
unscriptable authored Sep 5, 2011
47 * protocol-relative urls fixed
48 * plugin-specific paths (for segmenting by file type)
49 * robust 404 detection for non-module js resources
af0ce65 added info about better AMD plugin compliance
unscriptable authored Sep 5, 2011
50 * better AMD plugin compliance
51 * new `dynamic: true` to prevent resource caching
52 * `normalize()` API for non-module-like resource names
1eaeebf added release notes to README
unscriptable authored Aug 23, 2011
53 * faster domReady detection in non-IE browsers
54 * link! plugin for ultra-simple css loading (no waiting, no embedding)
55 * new apiContext config param to keep curl API off global object
1a02ef6 minor comment update
unscriptable authored Sep 5, 2011
56 * `curl()` allows a single dependency to be specified without an array
9381825 removed broken !noexec option for js! plugin altogether
unscriptable authored Sep 3, 2011
57 * removed broken !noexec option for js! plugin since it no longer worked
58 in the current browsers
cc7c383 release 0.5.1
unscriptable authored Aug 15, 2011
59 * 0.5.1:
60 * fixes to domReady! in the compiled dist/ versions and
61 * fixes for commonjs compatibility caused by google-closure in dist/
62 versions
63 * support for parent module ids (../sibling-of-parent)
64 * 0.5:
65 * dojo 1.6 support has been moved to separate module (curl/dojo16Compat)
66 * curl/domReady now returns a callback function (not a promise)
67 * new async! plugin to allow a module to defer definition
68 * new css! plugin that inlines css into javascript when used with cram
69 * cram (AMD builder) support (css! and async! plugins)
70 * `require` is no longer an alias for `curl` unless you set the
71 `apiName` config param to "require"
72 * configuration parameters for plugins are now defined in a sub-object
73 of the main config object: { css: { cssOption: true } }
bb87447 more README cleanup
unscriptable authored Mar 23, 2011
74
75 TODO:
76
885b629 more updates for 0.
unscriptable authored Jan 10, 2012
77 * finish i18n plugin!
78 * create dojo 1.7 shim, if necessary
79 * document plugin configuration options and how to use each plugin
e8b5ef1 Edited README.md via GitHub
John Hann authored Apr 23, 2011
80 * notes about using JSONP (it works for objects, arrays, functions, numbers
6558745 corrected: JSONP works for fetching remote strings, too
John Hann authored Apr 15, 2011
81 and strings! use ?callback=define)
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
82
83 ----------------------------------------
84
85 What is curl.js?
c1519b8 more tests
unscriptable authored Feb 17, 2011
86 ================
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
87
17ceecb cuz it's fast man
unscriptable authored Jun 7, 2011
88 curl.js is a small and very fast AMD-compliant asynchronous loader.
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
89 Size: 5KB (2.5KB gzipped) using Google's Closure Compiler.
fc8f801 updated to version 0.3!
unscriptable authored Mar 23, 2011
90
d5d4eb3 updated to latest features
unscriptable authored Apr 16, 2011
91 If you'd like to use curl.js for non-AMD modules (ordinary javascript files),
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
92 you'll want to use a version with the js! plugin built in. You may also
d5d4eb3 updated to latest features
unscriptable authored Apr 16, 2011
93 want to build-in the domReady module. The combined curl+js+domReady loader
a56d6ce minor updates to dates and file sizes
unscriptable authored Aug 23, 2011
94 is still only 6.5KB (3KB gzipped).
fc8f801 updated to version 0.3!
unscriptable authored Mar 23, 2011
95
d5d4eb3 updated to latest features
unscriptable authored Apr 16, 2011
96 What the heck is "cujo"? cujo.js is a web app development platform.
97 See the bottom of this file for more info.
f778b1f Edited README.md via GitHub
John Hann authored Mar 25, 2011
98
f06405b updated README to reflect latest features and API
unscriptable authored Jul 20, 2011
99 What is "cram"? cram (cujo resource assembler) is the build tool companion to
100 curl.js. You use cram to compile all of your modules into a small number of
101 javascript files which are loaded much faster into the browsers.
102
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
103 ----------------------------------------
104
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
105 Features at a glance:
106 =====================
107
f125b8c Edited README.md via GitHub
John Hann authored Mar 25, 2011
108 * Loads CommonJS AMD-formatted javascript modules in parallel (fast!)
20fbf55 added notes about CommonJS Modules 1.1 support
unscriptable authored Apr 1, 2011
109 * Loads CommonJS Modules (v1.1 when wrapped in a `define()`) (fast!)
d5d4eb3 updated to latest features
unscriptable authored Apr 16, 2011
110 * Loads CommonJS Packages (v1.1 modules wrapped in a `define()`) (fast!)
f125b8c Edited README.md via GitHub
John Hann authored Mar 26, 2011
111 * Loads non-AMD javascript files in parallel, too (fast! via js! plugin)
112 * Loads CSS files and text files in parallel (fast! via plugins)
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
113 * Waits for dependencies (js, css, text, etc) before executing javascript
f125b8c Edited README.md via GitHub
John Hann authored Mar 26, 2011
114 * Waits for domReady, if/when desired
115 * Allows for virtually limitless combinations of files and dependencies
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
116 * Tested with Chrome, FF3+, Safari 3.2+, IE6-8, Opera 9.5+
117
17ceecb cuz it's fast man
unscriptable authored Jun 8, 2011
118 Oh, did we mention? It's fast! It's even faster than the leading non-AMD
119 script loaders.
f125b8c Edited README.md via GitHub
John Hann authored Mar 26, 2011
120
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
121 ----------------------------------------
5ac0fcd Edited README.md via GitHub
John Hann authored Oct 2, 2011
122
123 How to get support
124 ===============
125
24e03a0 @unscriptable fixed urls to point to cujojs repos instead of unscriptable repos
unscriptable authored Jan 23, 2012
126 1. Go to the issues section of the curl repo (https://github.com/cujojs/curl/issues)
5ac0fcd Edited README.md via GitHub
John Hann authored Oct 3, 2011
127 and search for an answer to your question or problem.
128 2. If no answer exists, file a new ticket! Somebody will typically respond within a
129 few hours.
130
131 It's that easy.
132
133 ----------------------------------------
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
134
135 API at a glance
136 ===============
137
24e03a0 @unscriptable fixed urls to point to cujojs repos instead of unscriptable repos
unscriptable authored Jan 23, 2012
138 For a complete description, check out the [wiki](https://github.com/cujojs/curl/wiki).
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
139
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
140 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 5, 2011
141 curl(['dep1', 'dep2', 'dep3' /* etc */], callback);
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
142 ```
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
143
c1ee8af we can haz markdown!
unscriptable authored Mar 23, 2011
144 Loads dependencies and the executes callback.
20fd1ca Edited README.md via GitHub
John Hann authored Mar 25, 2011
145
34ceaec cleaned up some API definitions
John Hann authored Mar 25, 2011
146 * ['dep1', 'dep2', 'dep3']: Module names or plugin-prefixed resource files
d5d4eb3 updated to latest features
unscriptable authored Apr 16, 2011
147 * callback: Function to receive modules or resources. This is where you'd
148 typically start up your app.
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
149
11a6dc1 Edited README.md via GitHub
John Hann authored Mar 25, 2011
150 ---------
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
151
152 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
153 curl(['dep1', 'dep2', 'dep3' /* etc */])
154 .then(callback, errorback);
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
155 ```
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
156
c1ee8af we can haz markdown!
unscriptable authored Mar 23, 2011
157 Promises-based API for executing callbacks.
20fd1ca Edited README.md via GitHub
John Hann authored Mar 26, 2011
158
34ceaec cleaned up some API definitions
John Hann authored Mar 26, 2011
159 * ['dep1', 'dep2', 'dep3']: Module names or plugin-prefixed resource files
160 * callback: Function to receive modules or resources
161 * errorback: Function to call if an exception occurred while loading
24e03a0 @unscriptable fixed urls to point to cujojs repos instead of unscriptable repos
unscriptable authored Jan 23, 2012
162 * For full CommonJS Promises/A compliance, use [when.js](https://github.com/cujojs/when)
2e508fd added note to use when.js for CommonJS Promises/A compliance
John Hann authored Jan 4, 2012
163 * `when(curl(['dep1']).then(callback);`
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
164
11a6dc1 Edited README.md via GitHub
John Hann authored Mar 26, 2011
165 ---------
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
166
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
167 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
168 curl(config, ['dep1', 'dep2', 'dep3' /* etc */], callback);
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
169 ```
c1ee8af we can haz markdown!
unscriptable authored Mar 23, 2011
170 Specify configuration options, load dependencies, and execute callback.
20fd1ca Edited README.md via GitHub
John Hann authored Mar 26, 2011
171
34ceaec cleaned up some API definitions
John Hann authored Mar 26, 2011
172 * config: Object containing curl configuration options (paths, etc.)
173 * ['dep1', 'dep2', 'dep3']: Module names or plugin-prefixed resource files
174 * callback: Function to receive modules or resources
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
175
11a6dc1 Edited README.md via GitHub
John Hann authored Mar 26, 2011
176 ---------
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
177
178 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
179 curl(['domReady!', 'dep2', 'dep3' /* etc */])
180 .then(
181 callback,
182 errorback
183 );
184 curl(['dep1', 'dep2', 'domReady!' /* etc */], function (dep1, dep2) {
185 // do something here
186 });
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
187 ```
2f2a139 added an example to the README
unscriptable authored Mar 15, 2011
188
c1ee8af we can haz markdown!
unscriptable authored Mar 23, 2011
189 Executes the callback when the dom is ready for manipulation AND
190 all dependencies have loaded.
20fd1ca Edited README.md via GitHub
John Hann authored Mar 26, 2011
191
34ceaec cleaned up some API definitions
John Hann authored Mar 26, 2011
192 * callback: No parameters except the domReady object
193 * errorback: Function to call if an exception occurred while loading
2f2a139 added an example to the README
unscriptable authored Mar 15, 2011
194
11a6dc1 Edited README.md via GitHub
John Hann authored Mar 26, 2011
195 ---------
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
196
197 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
198 curl(['domReady!', 'js!nonAMD.js!order', 'js!another.js!order']), function () {
199 /* do something cool here */
200 });
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
201 ```
fc8f801 updated to version 0.3!
unscriptable authored Mar 23, 2011
202
cf5fb83 curl() now looks for promises returned from define()s -- either direc…
unscriptable authored Mar 23, 2011
203 Executes the function when the non-AMD javascript files are loaded and
204 the dom is ready. The another.js file will wait for the nonAMD.js file
205 before executing.
fc8f801 updated to version 0.3!
unscriptable authored Mar 23, 2011
206
11a6dc1 Edited README.md via GitHub
John Hann authored Mar 26, 2011
207 ---------
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
208
209 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
210 curl(['js!nonAMD.js'])
211 .next(['dep1', 'dep2', 'dep3'], function (dep1, dep2, dep3) {
212 // do something before the dom is ready
213 })
214 .next(['domReady!'])
215 .then(
216 function () {
217 // do something after the dom is ready
218 },
219 function (ex) {
220 // show an error to the user
221 }
222 );
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
223 ```
b46b353 changed the name of (and fixed) the dependency-chaining API to .next(…
unscriptable authored Mar 23, 2011
224
20fbf55 added notes about CommonJS Modules 1.1 support
unscriptable authored Apr 1, 2011
225 Executes callbacks in stages using `.next(deps, callback)`.
b46b353 changed the name of (and fixed) the dependency-chaining API to .next(…
unscriptable authored Mar 24, 2011
226
11a6dc1 Edited README.md via GitHub
John Hann authored Mar 26, 2011
227 ---------
949c3d3 Edited README.md via GitHub
John Hann authored Mar 25, 2011
228
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
229 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
230 curl = {
231 baseUrl: '/path/to/my/js',
232 pluginPath: 'for/some/reason/plugins/r/here',
233 paths: {
234 curl: 'curl/src/curl',
4fd3d51 fix #18: Javascript syntax error in README.md
unscriptable authored Sep 7, 2011
235 cssx: 'cssx/src/cssx',
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
236 my: '../../my-lib/'
237 },
238 apiName: 'someOtherName'
239 };
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
240 ```
949c3d3 Edited README.md via GitHub
John Hann authored Mar 26, 2011
241
d5d4eb3 updated to latest features
unscriptable authored Apr 16, 2011
242 If called before the `<script>` that loads curl.js, configures curl.js. All of
243 the configuration parameters are optional. curl.js tries to do something sensible
9e6e1a7 Updated TODO items and added more info about configuration paramaters
John Hann authored Mar 30, 2011
244 in their absence. :)
245
246 * baseUrl: the root folder to find all modules, default is the document's folder
247 * paths: a mapping of module paths to relative paths (from baseUrl)
248 * pluginPath: the place to find plugins when they are specified without a path
249 (e.g. "css!myCssFile" vs. "cssx/css!myCssFile") and there is no paths
250 mapping that applies.
d5d4eb3 updated to latest features
unscriptable authored Apr 16, 2011
251 * apiName: an alternate name to `curl` and `require` for curl.js's global
252 variable
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
253 * apiContext: an object, rather than `window`, to place curl on when using
254 `apiName`
949c3d3 Edited README.md via GitHub
John Hann authored Mar 26, 2011
255
256 ---------
20fbf55 added notes about CommonJS Modules 1.1 support
unscriptable authored Apr 1, 2011
257
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
258 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
259 define(['dep1', 'dep2', 'dep3' /* etc */], definition);
260 define(['dep1', 'dep2', 'dep3' /* etc */], module);
261 define(['dep1', 'dep2', 'dep3' /* etc */], promise);
262 define(module);
263 define(name, ['dep1', 'dep2', 'dep3' /* etc */], definition);
264 define(name, ['dep1', 'dep2', 'dep3' /* etc */], module);
265 define(name, ['dep1', 'dep2', 'dep3' /* etc */], promise);
266 define(name, module);
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
267 ```
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
268
c1ee8af we can haz markdown!
unscriptable authored Mar 23, 2011
269 Defines a module per the CommonJS AMD proposed specification.
20fd1ca Edited README.md via GitHub
John Hann authored Mar 26, 2011
270
20fbf55 added notes about CommonJS Modules 1.1 support
unscriptable authored Apr 1, 2011
271 * ['dep1', 'dep2', 'dep3']: Module names or plugin-prefixed resource files.
272 Dependencies may be named 'require', 'exports', or 'module' and will behave
273 as defined in the CommonJS Modules 1.1 proposal.
34ceaec cleaned up some API definitions
John Hann authored Mar 26, 2011
274 * definition: Function called to define the module
275 * module: Any javascript object, function, constructor, or primitive
276 * name: String used to name a module (not necessary nor recommended)
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
277
278 ----------------------------------------
279
2f2a139 added an example to the README
unscriptable authored Mar 15, 2011
280 Very Simple Example
281 ===================
282
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
283 ```html
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
284 <script>
2f2a139 added an example to the README
unscriptable authored Mar 15, 2011
285
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
286 // configure curl
287 curl = {
288 paths: {
289 cssx: 'cssx/src/cssx/',
4fd3d51 fix #18: Javascript syntax error in README.md
unscriptable authored Sep 7, 2011
290 stuff: 'my/stuff/'
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
291 }
292 };
293
294 </script>
295 <script src="../js/curl.js" type="text/javascript"></script>
296 <script type="text/javascript">
297
298 curl(
299 // fetch all of these resources ("dependencies")
300 [
301 'stuff/three', // an AMD module
302 'cssx/css!stuff/base', // a css file
303 'i18n!stuff/nls/strings', // a translation file
304 'text!stuff/template.html', // an html template
305 'domReady!'
306 ]
307 )
308 // when they are loaded
309 .then(
310 // execute this callback, passing all dependencies as params
311 function (three, link, strings, template) {
312 var body = document.body;
313 if (body) {
314 body.appendChild(document.createTextNode('three == ' + three.toString() + ' '));
315 body.appendChild(document.createElement('br'));
316 body.appendChild(document.createTextNode(strings.hello));
317 body.appendChild(document.createElement('div')).innerHTML = template;
2f2a139 added an example to the README
unscriptable authored Mar 15, 2011
318 }
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
319 },
320 // execute this callback if there was a problem
321 function (ex) {
322 var msg = 'OH SNAP: ' + ex.message;
323 alert(msg);
324 }
325 );
2f2a139 added an example to the README
unscriptable authored Mar 15, 2011
326
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
327 </script>
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
328 ```
2f2a139 added an example to the README
unscriptable authored Mar 15, 2011
329
e8b5ef1 Edited README.md via GitHub
John Hann authored Apr 23, 2011
330 The file structure for this example would look as follows:
331
332 js/
333 curl/
334 plugin/
335 i18n.js
336 text.js
337 domReady.js
338 cssx/
339 src/
340 cssx/
341 css.js
342 my/
343 stuff/
344 nls/
345 strings.js
346 base.css
347 template.html
348 three.js
349 curl.js
350
2f2a139 added an example to the README
unscriptable authored Mar 15, 2011
351 ----------------------------------------
352
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
353 What is an asynchronous loader?
c1519b8 more tests
unscriptable authored Feb 18, 2011
354 ===============================
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
355
356 Web apps, especially large ones, require many modules and resources. Most of
357 these modules and resources need to be loaded at page load, but some may be
7d97cca minor tweaks
John Hann authored Mar 6, 2011
358 loaded later, either in the background or "just in time". They also need to be
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
359 loaded as quickly as possible.
360
bb87447 more README cleanup
unscriptable authored Mar 23, 2011
361 The traditional way to load javascript modules is via a `<SCRIPT>` element in
362 an HTML page. Similarly, CSS files are loaded via a `<LINK>` element, and
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
363 text resources are either loaded in the page or via XHR calls.
364
bb87447 more README cleanup
unscriptable authored Mar 23, 2011
365 The problem with `<SCRIPT>` and `<LINK>` elements is that a browser must execute
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
366 them sequentially since it has no idea if one may depend on another. It just
367 assumes the developer has placed them in the correct order and that there are
368 dependencies. (The term "synchronous loading" is used to describe this process
369 since the elements are executed in a single timeline.)
370
371 If there are no dependencies between two files, loading them sequentially is
372 a waste of time. These files could be loaded and executed in parallel (i.e
373 at the same time).
374
e14209e clarified README
John Hann authored Feb 17, 2011
375 An asynchronous loader does just that: it loads javascript files (and
7d97cca minor tweaks
John Hann authored Mar 7, 2011
376 other types of files) in parallel whenever possible.
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
377
20f0204 minor clarififcations to README
unscriptable authored Feb 7, 2011
378 curl.js has lots of company. Other async loaders include LABjs, Steal.js,
34a83a2 more tweaks
unscriptable authored Mar 23, 2011
379 yepnope.js, $script.js, the Backdraft loader (bdLoad), and RequireJS.
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
380
d5d4eb3 updated to latest features
unscriptable authored Apr 16, 2011
381 [(a more complete list)](https://spreadsheets.google.com/ccc?key=0Aqln2akPWiMIdERkY3J2OXdOUVJDTkNSQ2ZsV3hoWVE&hl=en#gid=2)
949c3d3 Edited README.md via GitHub
John Hann authored Mar 26, 2011
382
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
383 ----------------------------------------
384
385 What is AMD?
c1519b8 more tests
unscriptable authored Feb 18, 2011
386 ============
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
387
388 Asynchronous Module Definition is the CommonJS proposed standard for
9bdd554 more about AMD and CommonJS
John Hann authored Mar 25, 2011
389 javascript modules that can be loaded by asynchronous loaders. It defines
390 a simple API that developers can use to write their javascript modules so
391 that they may be loaded by any AMD-compliant loader.
392
393 [CommonJS AMD Proposal](http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition)
394
395 The AMD proposal follows the [CommonJS Modules](http://wiki.commonjs.org/wiki/Modules/1.1)
396 proposal as much as possible. Because of the way browsers load and
397 evaluate scripts, AMD can't follow it completely without causing significant
398 processing overhead. Instead, AMD allows us to place a lightweight wrapper
399 around javascript modules to help work around the shortcomings.
400
401 Ultimately, both proposals (AMD and Modules 1.1) are in preparation for an
402 official [javascript modules](http://wiki.ecmascript.org/doku.php?id=harmony:modules)
403 specification and eventual implementation in browsers.
404
405 If you don't want to wait for official javascript modules, then don't. The future
406 is now. AMD works now -- and it's awesome.
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
407
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
408 AMD's API focuses on one globally-available function: `define()` and some
409 CommonJS-inspired variables, `require()`, `exports`, and `module`.
410 `require()` specifies a list of dependent modules or resources that must be
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
411 loaded before running a set of code. This code resides in a callback function
412 that is executed asynchronously, i.e. it runs later, not in the current
e14209e clarified README
John Hann authored Feb 17, 2011
413 "thread". Specifically, it executes when all of the dependencies are loaded
414 and ready.
415
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
416 The proposal does not mandate that `require()` be specified globally. In fact,
417 at a global level, the concerns of a loader are about application bootstrapping
418 and not about finding dependencies. To keep the confusion about these two
419 concepts to a minimum, curl.js uses `curl()` for the public API. You may rename
420 this API back to `require()` by supplying the `apiName` config param
421 (`apiName: "require"`), but this is not receommended.
e14209e clarified README
John Hann authored Feb 17, 2011
422
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
423 It's more important that the `define()` method be consistent. This is the
424 method that tells the loader what modules have been loaded by a script.
425 `define()` also specifies a list of dependencies and a callback function that
426 defines and/or creates the resource when the dependencies are ready.
427 Optionally, `define()` also takes a name parameter, but this is mainly for build
428 tools and optimizers.
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
429
1d8f14b pdated to latest version and removed all references to the old public…
unscriptable authored May 18, 2011
430 Inside the `define()`, the `require()` method acts like other AMD loaders.
431
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
432 AMD's API also helps code reuse by providing compatibility with CommonJS
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
433 (server) modules. AMD-compliant loaders support the same `require()` syntax and
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
434 argument signatures as server-side javascript (ssjs) modules.
435
436 Not all async loaders are AMD-compliant. Of the list above, only the following
437 are AMD-compliant:
438
24e03a0 @unscriptable fixed urls to point to cujojs repos instead of unscriptable repos
unscriptable authored Jan 23, 2012
439 curl.js <http://github.com/cujojs/curl>
34a83a2 more tweaks
unscriptable authored Mar 23, 2011
440
851d03e getting the hang of this markdown stuff
unscriptable authored Mar 23, 2011
441 RequireJS <http://requirejs.org/>
34a83a2 more tweaks
unscriptable authored Mar 23, 2011
442
9cdc228 @pmcelhaney Trivial README edits. Fixed Backdraft links and added links to @twitt…
pmcelhaney authored May 27, 2011
443 backdraft loader <http://bdframework.org/bdLoad>
e14209e clarified README
John Hann authored Feb 17, 2011
444
445 The beauty of AMD loaders is their ability to remove the drudgery of manually
446 managing dependencies. Since all dependencies are listed within the
447 modules, the loader will ensure that everything is loaded into the browser --
448 and in the right order.
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
449
450 ----------------------------------------
451
452 What makes curl different from other AMD loaders?
c1519b8 more tests
unscriptable authored Feb 18, 2011
453 =================================================
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
454
949c3d3 Edited README.md via GitHub
John Hann authored Mar 26, 2011
455 curl.js is much smaller than other AMD loaders. Less than 1/2 the size of the
ca44d3b updated docs to reflect new feature: require() returns a Promise
unscriptable authored Feb 16, 2011
456 others in the list above. It's able to achieve this via a Promises-based
949c3d3 Edited README.md via GitHub
John Hann authored Mar 26, 2011
457 design. (Promises are another [CommonJS proposed standard](http://wiki.commonjs.org/wiki/Promises).)
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
458
ca44d3b updated docs to reflect new feature: require() returns a Promise
unscriptable authored Feb 17, 2011
459 curl.js communicates with it's plugins via Promises, rather than a simple
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
460 callback function. This allows proactive error handling, rather than detecting
461 problems via a timeout, which can be tricky to set correctly. curl does this in
462 a backwards-compatible way so AMD-compliant plugins will still work in curl.
463
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
464 curl.js will also return a promise from `curl()` calls. This allows you to
ca44d3b updated docs to reflect new feature: require() returns a Promise
unscriptable authored Feb 17, 2011
465 write code like this:
466
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
467 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
468 curl(
469 [
470 'myApp/moduleA',
471 'myApp/moduleB'
472 ],
473 ).then(
474 function success (A, B) {
475 // load myApp here!
476 },
477 function failure (ex) {
478 alert('myApp didn't load. reason: ' + ex.message);
479 }
480 );
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
481 ```
ca44d3b updated docs to reflect new feature: require() returns a Promise
unscriptable authored Feb 17, 2011
482
4996694 Edited README.md via GitHub
John Hann authored Apr 29, 2011
483 (When using `require` as a dependency, it does not return a promise.
484 This is so that 100% CommonJS compliance is assured inside modules.)
ca44d3b updated docs to reflect new feature: require() returns a Promise
unscriptable authored Feb 17, 2011
485
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
486 ----------------------------------------
487
6c0f0fe bumped version to 0.2 and added some content about non-AMD files
unscriptable authored Mar 13, 2011
488 Can curl.js work with non-AMD javascript files?
489 ===============================================
490
491 Yes, but why would you? Once you start using AMD, you'll never go back! :)
492
493 You may use non-AMD javascript files by specifying the js! plugin prefix
494 like this:
495
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
496 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
497 curl(
498 [
499 'js!plainOldJsFile1.js!order',
500 'js!anotherPlainOldJsFile.js!order'
501 ]
502 ).then(
503 function () {
504 /* do something with your plain, boring javascript files */
505 },
506 function () {
507 /* do something if any fail to load */
508 }
509 );
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
510 ```
c1ee8af we can haz markdown!
unscriptable authored Mar 23, 2011
511
d5d4eb3 updated to latest features
unscriptable authored Apr 16, 2011
512 The !order suffix instructs curl.js to wait for previous scripts to execute
4996694 Edited README.md via GitHub
John Hann authored Apr 29, 2011
513 before executing the current script. All scripts download in parallel, though,
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
514 unless you specify `prefetch: false` in the config. Be sure to have proper
515 cache headers set if you plan to use `prefetch: true` or scripts will get
516 downloaded twice in browsers that don't support `async="false"`.
6c0f0fe bumped version to 0.2 and added some content about non-AMD files
unscriptable authored Mar 14, 2011
517
518 ----------------------------------------
519
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
520 Can curl.js load non-javascript files?
521 =======================
522
523 Yes, curl.js follows the CommonJS Loader Plugin specification, so you can use
524 any compatible plugin. The following plugins are included:
525
24e03a0 @unscriptable fixed urls to point to cujojs repos instead of unscriptable repos
unscriptable authored Jan 23, 2012
526 js! -- loads non-AMD javascript files. more info on the [wiki](https://github.com/cujojs/curl/wiki/js)
34a83a2 more tweaks
unscriptable authored Mar 23, 2011
527
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
528 text! -- loads text files
529
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
530 link! -- loads css files via a link element (simple, fast)
531
532 css! -- loads css files (lots of options)
533
534 domReady! -- resolves when the dom is ready for manipulation
535
536 async! -- resolves when a module signals it's ready
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
537
4996694 Edited README.md via GitHub
John Hann authored Apr 29, 2011
538 The following plugins are in progress:
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
539
540 i18n! -- loads text strings and other locale-specific constants
34a83a2 more tweaks
unscriptable authored Mar 23, 2011
541
24e03a0 @unscriptable fixed urls to point to cujojs repos instead of unscriptable repos
unscriptable authored Jan 23, 2012
542 Complete plugin docs are on the [wiki](https://github.com/cujojs/curl/wiki/Plugins).
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
543
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
544 ----------------------------------------
545
ee4b740 moar text in the README
unscriptable authored Feb 6, 2011
546 How are modules loaded?
c1519b8 more tests
unscriptable authored Feb 18, 2011
547 =======================
ee4b740 moar text in the README
unscriptable authored Feb 7, 2011
548
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
549 curl.js uses `<script>` element injection rather than XHR/eval. This allows
550 curl.js to load cross-domain scripts as well as local scripts.
949c3d3 Edited README.md via GitHub
John Hann authored Mar 26, 2011
551
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
552 To find scripts and other resources, curl.js uses module names. A module name
d5d4eb3 updated to latest features
unscriptable authored Apr 16, 2011
553 looks just like a file path, but typically without the file extension. If a
554 module requires a plugin in order to load correctly, it will have a prefix
555 delimited by a "!" and will also often have a file extension when a plugin
556 may load different types of files.
949c3d3 Edited README.md via GitHub
John Hann authored Mar 26, 2011
557
558 Some examples of module names:
559
560 * dojo/store/JsonRest
561 * my/lib/string/format
562 * js!my/lib/js/plain-old-js.js
563 * css!my/styles/reset.css
564 * http://some-cdn/uber/module
565
566 By default, curl.js will look in the same folder as the current document's location.
567 For instance, if your web page is located at `http://my-domain/apps/myApp.html`,
568 curl.js will look for the JsonRest module at `http://my-domain/apps/dojo/store/JsonRest.js`.
569
570 You can tell curl.js to find modules in other locations by specifying a baseUrl or
571 individual paths for each of your libraries. For example, if you specify a baseUrl of
572 `/resources/` and the following paths:
573
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
574 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
575 paths: {
576 dojo: "third-party/dojo",
577 css: "third-party/cssmojo/css",
578 my: "my-cool-app-v1.3",
579 "my/lib/js": "old-js-libs"
580 }
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
581 ```
949c3d3 Edited README.md via GitHub
John Hann authored Mar 26, 2011
582
583 Then the modules listed above will be sought in the following locations:
584
585 * /resources/third-party/dojo/store/JsonRest.js
586 * /resources/my-cool-app-v1.3/lib/string/format.js
587 * /resources/old-js-libs/plain-old-js.js
588 * /resources/my-cool-app-v1.3/styles/reset.css
589 * http://some-cdn/uber/module.js
590
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
591 Note: you will need to create a path to curl.js's plugins and other modules if
592 the curl folder isn't directly under the same folder as your web page. curl.js
593 uses the same mechanism to find its own modules.
ee4b740 moar text in the README
unscriptable authored Feb 7, 2011
594
595 ----------------------------------------
596
597 What are AMD plugins?
c1519b8 more tests
unscriptable authored Feb 18, 2011
598 =====================
ee4b740 moar text in the README
unscriptable authored Feb 7, 2011
599
600 AMD supports the notion of plugins. Plugins are AMD modules that can be used to
601 load javascript modules -- or other types of resources. curl comes with several
602 plugins already, including a text plugin (for templates or other text
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
603 resources), two different css plugins, a dojo 1.6 compatibility plugin,
604 a dom-ready plugin and a debug plugin (for collecting and logging details of the
605 inner workings of curl).
ee4b740 moar text in the README
unscriptable authored Feb 7, 2011
606
607 Plugins are designated by a prefix on the name of the module or resource to be
608 loaded. They are delineated by a ! symbol. The following example shows the use
609 of some plugins:
610
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
611 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
612 define(
613 [
614 'text!myTemplate.html',
615 'css!myCssFile'
616 ],
617 function (templateString, cssLinkNode) {
618 // do something with the template and css here
619 }
620 );
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
621 ```
ee4b740 moar text in the README
unscriptable authored Feb 7, 2011
622
623 Since plugins are just AMD modules, they would typically be referenced using
624 their fully-pathed names. curl provides a pluginPath configuration option that
625 allows you to specify the folder where [most of] your plugins reside so you
626 don't have to specify their full paths. This also helps with compatibility
627 with other AMD loaders that assume that certain plugins are bundled and
628 internally mapped.
629
630 If one or more of your plugins does not reside in the folder specified by the
631 pluginPath config option, you can use its full path or you can specify a path
632 for it in curl's paths config object.
633
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
634 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
635 // example of a fully-pathed plugin under the cssx folder
636 define(['/css!myCssFile'], function (cssxDef) {
637 // do some awesome css stuff here
638 });
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
639 ```
ee4b740 moar text in the README
unscriptable authored Feb 7, 2011
640
641 Plugins can also have configuration options. Global options can be specified
642 on curl's configuration object. Options can also be supplied to plugins via
643 suffixes. Suffixes are also delineated by the ! symbol. Here's an example of
644 a plugin using options:
645
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
646 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
647 // don't try to repair IE6-8 opacity issues in my css file
648 define(['css!myCssFile!ignore:opacity'], function (cssxDef) {
649 // do some awesome css stuff here
650 });
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
651 ```
ee4b740 moar text in the README
unscriptable authored Feb 7, 2011
652
653 ----------------------------------------
654
fccc4e9 the start of a README
unscriptable authored Feb 7, 2011
655 How do I use curl.js?
c1519b8 more tests
unscriptable authored Feb 18, 2011
656 =====================
ee4b740 moar text in the README
unscriptable authored Feb 7, 2011
657
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
658 1. Learn about AMD-formatted javascript modules if you don't already know how.
949c3d3 Edited README.md via GitHub
John Hann authored Mar 26, 2011
659 2. Clone or download curl to your local machine or server.
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
660 3. Figure out the baseUrl and paths configuration that makes sense for your
661 project.
662 4. Check out the "API at a glance" section above to figure out which loading
663 methodology you want to use.
949c3d3 Edited README.md via GitHub
John Hann authored Mar 26, 2011
664 5. Study the "Very Simple Example" and some of the test files.
665 6. Try it on your own files.
39b5e54 updated README to reflect latest features
unscriptable authored Mar 14, 2011
666
ee4b740 moar text in the README
unscriptable authored Feb 7, 2011
667 ----------------------------------------
668
e14209e clarified README
John Hann authored Feb 17, 2011
669 Too Many Modules!
c1519b8 more tests
unscriptable authored Feb 18, 2011
670 =================
e14209e clarified README
John Hann authored Feb 17, 2011
671
ee4b740 moar text in the README
unscriptable authored Feb 7, 2011
672 I have dozens (or hundreds) of modules. Even with parallel loading, the
20f0204 minor clarififcations to README
unscriptable authored Feb 7, 2011
673 performance sucks! What can I do about that?
ee4b740 moar text in the README
unscriptable authored Feb 7, 2011
674
675 True! No parallel loader can lessen the latency required to create an HTTP
676 connection. If you have dozens or hundreds of files to download, it's going to
677 take time to initiate each of the connections.
678
679 However, there are tools to that are designed to fix this problem! There are
680 builders and compilers. dojo users are probably already familiar with dojo's
681 build tool and optimizer. RequireJS comes with a build tool and Google's
682 Closure compiler.
683
684 The build tool is used to concatenate several modules (and/or resources)
685 into just a few files. It does this by following the dependency chain
686 specified in the define() and require() calls. You can specify which top-level
687 modules or resources are in each file and the build tool finds the rest.
688
689 After the build tool creates the concatenated files, the files can be passed
690 into a compiler (also called a shrinker or compressor).
691
692 We're writing curl to be compatible with RequireJS's build tool, but there's
24e03a0 @unscriptable fixed urls to point to cujojs repos instead of unscriptable repos
unscriptable authored Jan 23, 2012
693 also another cujo project in the pipeline: [cram](https://github.com/cujojs/cram).
49b5d1b many updates to current specs
unscriptable authored Sep 6, 2011
694 Cram is the Cujo Resource Assembler.
20f0204 minor clarififcations to README
unscriptable authored Feb 7, 2011
695
696 ----------------------------------------
0e0a920 added kudos for Bryan and James
unscriptable authored Mar 14, 2011
697
4a92fee notes about Packages 1.1 support and updates to What's New and size
unscriptable authored Apr 19, 2011
698 CommonJS Package Support
699 ========================
700
701 cujo.js supports the CommonJS Packages 1.1 specification. Packages are
702 defined in the packages configuration parameter:
703
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
704 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
705 cujo = {
706 baseUrl: 'path/to/js',
707 packages: {
708 'my-package': {
709 path: 'path/to/my-package',
710 main: 'main/main-module-file',
711 lib: 'location/of/other/modules'
4a92fee notes about Packages 1.1 support and updates to What's New and size
unscriptable authored Apr 19, 2011
712 }
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
713 }
714 };
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
715 ```
4a92fee notes about Packages 1.1 support and updates to What's New and size
unscriptable authored Apr 19, 2011
716
717 The path property describes where to find the package in relation to the
718 baseUrl parameter. The main and lib properties describe where to find modules
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
719 inside the package. The main property gives the relative path to the package's
4a92fee notes about Packages 1.1 support and updates to What's New and size
unscriptable authored Apr 19, 2011
720 main module. The lib property reflects the path to all other modules in the
721 package.
722
723 In the example above, the main module of the package can be obtained as follows
724
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
725 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
726 curl(['my-package'], callback);
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
727 ```
4a92fee notes about Packages 1.1 support and updates to What's New and size
unscriptable authored Apr 19, 2011
728
729 and will be fetched from the following path:
730
67c4e4f @ryanflorence Formatting fix for path
ryanflorence authored Oct 12, 2011
731 path/to/js/path/to/my-package/main/main-module-file.js
4a92fee notes about Packages 1.1 support and updates to What's New and size
unscriptable authored Apr 19, 2011
732
733 Some other file in the package would be obtained as follows:
734
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
735 ```javascript
594d367 code snippets reformatted
unscriptable authored Sep 6, 2011
736 curl(['my-package/other-module'], callback);
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
737 ```
4a92fee notes about Packages 1.1 support and updates to What's New and size
unscriptable authored Apr 19, 2011
738
739 and will be fetched from the following path:
740
11267dc updated to 0.5.2
unscriptable authored Sep 4, 2011
741 path/to/js/path/to/my-package/location/of/other/modules/other-module.js
4a92fee notes about Packages 1.1 support and updates to What's New and size
unscriptable authored Apr 19, 2011
742
743 ----------------------------------------
744
f778b1f Edited README.md via GitHub
John Hann authored Mar 26, 2011
745 What is cujo?
746 =====================
747
748 cujo.js is a web app development platform. It employs MVC, IOC, AMD
749 and lots of other TLAs. :) curl.js is one of the many micro-libs we're pulling
750 out of cujo.js. Our goal is to make the advanced concepts in cujo.js more
751 palatable by breaking them down into easier-to-grok chunks. Other cujo.js
752 libs include:
753
24e03a0 @unscriptable fixed urls to point to cujojs repos instead of unscriptable repos
unscriptable authored Jan 23, 2012
754 * [canhaz](https://github.com/cujojs/canhaz): a project and code bootstrapping tool that will save you tons of typing.
755 * [wire](https://github.com/cujojs/wire): A light, fast, flexible Javascript IOC container
756 * [when.js](https://github.com/cujojs/when): A small, fast Promises/A compliant promises implementation
757 * [cram](https://github.com/cujojs/cram): a javascript compressor, concatenator, and optimizer meant to be used with curl.js
f778b1f Edited README.md via GitHub
John Hann authored Mar 26, 2011
758
759 Kudos
760 =================
761
9cdc228 @pmcelhaney Trivial README edits. Fixed Backdraft links and added links to @twitt…
pmcelhaney authored May 27, 2011
762 Many thanks to Bryan Forbes ([@bryanforbes](http://www.twitter.com/bryanforbes)) for helping to clean up my code and
b46b353 changed the name of (and fixed) the dependency-chaining API to .next(…
unscriptable authored Mar 24, 2011
763 for making cujo's domReady much more robust.
851d03e getting the hang of this markdown stuff
unscriptable authored Mar 23, 2011
764 More about Bryan: <http://www.reigndropsfall.net/>
12c2516 some more credit where credit is due
unscriptable authored Mar 15, 2011
765
9cdc228 @pmcelhaney Trivial README edits. Fixed Backdraft links and added links to @twitt…
pmcelhaney authored May 27, 2011
766 Kudos also to James Burke ([@jrburke](http://www.twitter.com/jrburke)) who instigated the CommonJS AMD proposal
b46b353 changed the name of (and fixed) the dependency-chaining API to .next(…
unscriptable authored Mar 24, 2011
767 and paved the way to create AMD-style loaders.
851d03e getting the hang of this markdown stuff
unscriptable authored Mar 23, 2011
768 More about James: <http://tagneto.blogspot.com/>
c1ee8af we can haz markdown!
unscriptable authored Mar 23, 2011
769
9cdc228 @pmcelhaney Trivial README edits. Fixed Backdraft links and added links to @twitt…
pmcelhaney authored May 27, 2011
770 Shout out to Kris Zyp ([@kriszyp](http://www.twitter.com/kriszyp)) for excellent ideas and feedback and to Kyle
771 Simpson ([@getify](http://www.twitter.com/getify)) who is inarguably the godfather of javascript loading.
Something went wrong with that request. Please try again.