forked from requirejs/requirejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdownload.html
More file actions
250 lines (201 loc) · 16.2 KB
/
download.html
File metadata and controls
250 lines (201 loc) · 16.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<div id="directory" class="section">
<h1>Download RequireJS</h1>
<ul class="index mono">
<li class="hbox"><a href="#latest">Latest Release</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span></li>
<ul>
<li class="hbox"><a href="#requirejs">require.js</a><span class="spacer boxFlex"></span><span class="sect">§ 1.1</span></li>
<li class="hbox"><a href="#samplejquery">Sample RequireJS + jQuery 1.5.1 project</a><span class="spacer boxFlex"></span><span class="sect">§ 1.2</span></li>
<li class="hbox"><a href="#rjs">r.js: Optimizer and Node and Rhino adapter</a><span class="spacer boxFlex"></span><span class="sect">§ 1.3</span></li>
</ul>
<li class="hbox"><a href="#previous">Plugins</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span></li>
<ul>
<li class="hbox"><a href="#text">text</a><span class="spacer boxFlex"></span><span class="sect">§ 2.1</span></li>
<li class="hbox"><a href="#order">order</a><span class="spacer boxFlex"></span><span class="sect">§ 2.2</span></li>
<li class="hbox"><a href="#cs">cs (CoffeeScript)</a><span class="spacer boxFlex"></span><span class="sect">§ 2.3</span></li>
<li class="hbox"><a href="#i18n">i18n</a><span class="spacer boxFlex"></span><span class="sect">§ 2.4</span></li>
</ul>
<li class="hbox"><a href="#releasenotes">Release Notes</a><span class="spacer boxFlex"></span><span class="sect">§ 3</span></li>
</ul>
</div>
<div class="section">
<h2><a name="latest">Latest Release</a><span class="sectionMark">§ 1</span></h2>
<div class="subSection">
<h4 class="hbox">
<a name="requirejs">require.js 0.24.0</a>
<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/minified/require.js">Minified</a>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/comments/require.js">With Comments</a>
</h4>
<p>All you need to start using require.js in the browser.</p>
</div>
<div class="subSection">
<h4 class="hbox">
<a name="samplejquery">Sample RequireJS 0.24.0 + jQuery 1.5.2 project</a>
<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/jquery-require/jquery1.5.2-requirejs0.24.0/jquery-require-sample.zip">Download</a>
</h4>
<p>A zip file containing a sample project that uses jQuery and RequireJS.</p>
</div>
<div class="subSection">
<h4 class="hbox">
<a name="rjs">r.js: Optimizer and Node and Rhino adapter</a>
<span class="boxFlex"></span>
<a class="download" href="https://github.com/jrburke/r.js/tree/master/dist">Download</a>
</h4>
<p>The r.js file allows you to run the optimizer as well as run modules in Node or Rhino.
The download button takes you to the r.js site to download the r.js file.</p>
<p>See the <a href="https://github.com/jrburke/r.js">r.js README</a> for more information.</p>
</div>
<div class="section">
<h2><a name="plugins">Plugins</a><span class="sectionMark">§ 2</span></h2>
<p>These are useful loader plugins that have the same license terms as require.js itself. Download the plugin file and place it as a sibling to your "data-main" main.js script.</p>
<div class="subSection">
<h4 class="hbox">
<a name="text">text</a>
<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/minified/text.js">Minified</a>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/comments/text.js">With Comments</a>
</h4>
<p><a href="api.html#text">Load text files and treat them as dependencies</a>. Great for loading templates. The text strings can be inlined in an optimized build when the optimizer is used.</p>
</div>
<div class="subSection">
<h4 class="hbox">
<a name="order">order</a>
<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/minified/order.js">Minified</a>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/comments/order.js">With Comments</a>
</h4>
<p><a href="api.html#order">Load script in the order specified in the dependency array</a>. Useful for existing scripts that have implied dependencies instead of calling define() to create modular code.</p>
</div>
<div class="subSection">
<h4 class="hbox">
<a name="cs">cs (CoffeeScript)</a>
<span class="boxFlex"></span>
<a class="download" href="https://github.com/jrburke/require-cs/raw/0.1.0/cs.js">With Comments</a>
</h4>
<p>Load files written in CoffeeScript. Includes a version of CoffeeScript, only this one file is needed. With this plugin, it is easy to code in CoffeeScript in the browser, it can participate in the optimizer optimizations, and it works in Node and Rhino via the <a href="#rjs">RequireJS adapter</a>. This is the best way to do cross-environment, modular CoffeeScript. <a href="https://github.com/jrburke/require-cs/">The project home</a> has more information on how to use it.</p>
</div>
<div class="subSection">
<h4 class="hbox">
<a name="i18n">i18n</a>
<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/minified/i18n.js">Minified</a>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/comments/i18n.js">With Comments</a>
</h4>
<p><a href="api.html#i18n">Load string bundles</a> used in internationalization (i18n) that are made up of separate country/language/locale-specific bundles.</p>
</div>
</div>
<div class="section">
<h2><a name="releasenotes">Release Notes</a><span class="sectionMark">§ 3</span></h2>
<h3>0.24.0</h3>
<ul>
<li>Support for IE 9. It has <a href="https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution">a non-conformant script loading behavior</a> that necessitated the change. It would be ideal if IE 9 would change the behavior to be conformant.</li>
<li>Changes to jQuery integration:
<ul>
<li>jQuery 1.5.1 included in sample project.</li>
<li><span style="text-decoration: line-through">No more bundled RequireJS and jQuery file. RequireJS includes special code to detect jQuery as a module, so the combined file is not necessary, and this approach makes it easier to swap in new versions of jQuery as they are released.</span> (Changed on April 1, 2011 back to the old integrated sample)</li>
<li><span style="text-decoration: line-through">Because of that change, the jQuery sample project uses the new priority: config approach.</span> (Changed on April 1, 2011 back to the old integrated sample)</li>
</ul>
<li>allplugins-require.js has been removed. Plugins are no longer bundled with require.js or in the sample jQuery project. There are separate download links to the existing plugins on the download page. Special treatment of these plugins has also been removed from the require.js source, so those plugins behave like any other loader plugin.</li>
<li>There is now a <a href="#cs">CoffeScript plugin</a>. It makes it easy to code in CoffeeScript in the browser, it can participate in the optimizer optimizations, and it works in Node and Rhino. This is the best way to do cross-environment, modular CoffeeScript.</li>
<li>Bug fixes.</li>
</ul>
<h3>0.23.0</h3>
<ul>
<li>Calculation of baseUrl changed. This affects the jQuery Sample project, which has been updated in this release. Instead of baseUrl defaulting to the directory containing require.js, it now defaults to the HTML page's directory. If data-main is used, then the directory used in that attribute becomes the baseUrl. Explicitly setting baseUrl in the configuration overrides the aforementioned defaults.</li>
<li>The RequireJS optimizer now uses Node by default. So, build.sh/.bat are now Node-based. Java/Rhino is still supported via the buildj.sh/.bat scripts.</li>
<li><a href="https://github.com/mishoo/UglifyJS">UglifyJS</a> is now the default minifier for the optimizer, since it works both in Node and in Rhino. However, UglifyJS does not do if/else dead code removal, so the <a href="optimization.html#hasjs">has() optimization</a> is not that great when using UglifyJS. Hopefully this will change in a future version of UglifyJS. If you want the full has() optimization, Closure Compiler can still be used, either by using buildj.sh to use Java/Rhino to do the optimization work, or by running Closure Compiler yourself after the optimizer runs.</li>
<li>The behavior of the Node adapter, r.js has changed. It now assumes that any module found via the RequireJS config uses define() to define modules. If a module is not found via the RequireJS path config, r.js uses Node's native require() function and its pathing rules
to find the module. This allows the most compatible use of npm-installed modules. However it means you <strong>should not</strong> include RequireJS configuration for npm-installed modules/packages.</li>
<li>The r.js adapter now works in Node and Rhino.</li>
<li>The config option, <strong>baseUrlMatch</strong> has been removed, since the data-main baseUrl rule mentioned above removes the need for it.</li>
<li>Some important fixes around loader plugins: a fix to allow multiple modules to use the same plugin resources as a common dependency, and to allow loader plugins that use a define() function callback to work in the optimizer.</li>
<li>A fix for the use of jQuery's readyWait capability when jQuery is detected and used as a module.</li>
<li>Some directory shuffling related to making the rhino and node adapters the same for use in command line tools and in the r.js adapter.</li>
</ul>
<h3>0.22.0</h3>
<ul>
<li>A <a href="plugins.html">full plugin API</a> that supports also including plugin loaded artifacts in optimized builds.</li>
<li><a href="node.html">Robust Node support</a>: now can use npm-installed modules, .node add-ons, and modules on require.paths.</li>
<li>Support for <a href="optimization.html#hasjs">has.js optimizations</a> in the optimizer, including dead code branch removal via Closure Compiler.</a>
<li><a href="https://github.com/jrburke/requirejs/commits/">Bug Fixes from 2010-12-21 through 2011-01-05</a>.</li>
</ul>
<h3>0.2.1 (should have been 0.21.0)</h3>
<ul>
<li>[Bug Fixes from 2010-12-16 through 2010-12-19](https://github.com/jrburke/requirejs/commits/)</li>
</ul>
<h3>0.2.0 (should have been 0.20.0)</h3>
<ul>
<li>Refactored core.</li>
<li>New loader plugin API support.</li>
<li>Improved Rhino and Node adapters</li>
<li>Bug fixes around loader plugins and the optimizer.</li>
<li>require.modify removed.</li>
<li>Removed Transport D files.</li>
</ul>
<h3>0.15.0</h3>
<ul>
<li>The bundled jQuery options now use jQuery 1.4.4.</li>
<li>The jQuery sample project now includes the ability to use RequireJS plugins.</li>
<li>The jsonp! plugin has been removed, since, thanks to work by Kris Zyp, the core loader now supports loading JSONP dependencies by default. The <a href="http://requirejs.org/docs/api.html#jsonp">JSONP docs</a> have been updated accordingly.</li>
<li>The optimizer can now be run from any directory, not just the directory with the build profile.</li>
<li>r.js Node adapter is more robust, and it can handle using more Node-written modules by default now. Thanks to Francois Laberge for a great test case application that lead to improving the robustness of r.js.</li>
<li>Initial support for PS3 Netfront browser. Thanks to Chris Warren for investigating the load behavior of the browser. Not all tests pass, but the basic ones do.</li>
<li>Miscellaneous fixes, some listed in <a href="https://github.com/jrburke/requirejs/issues/closed#sort=updated">the issue tracker</a>.</li>
</ul>
<h3>0.14.5</h3>
<ul>
<li><a href="http://github.com/jrburke/requirejs/commit/88847fe53ab2e97e7ba7ec8f2afc056fb29b0a70">Fix bug</a> where scripts were not loaded from the correct path. Did not affect RequireJS+jQuery builds, but affected other builds. If you do not use a RequireJS+jQuery build, then it is strongly recommended that you upgrade from 0.14.4 to 0.14.5.</li>
<li>Added an urlArgs <a href="http://requirejs.org/docs/api.html#config">config option</a> to allow for cache busting when servers/browser misbehave during development.</li>
</ul>
<h3>0.14.4</h3>
<ul>
<li>Support jQuery 1.4.3. The bundled RequireJS+jQuery bundle now uses RequireJS 1.4.3, and it is now possible to load jQuery directly from a CDN.</li>
<li>Remove the Transport D pre-built option from the download page. The Transport D adapter is still in the source bundler though.</li>
</ul>
<h3>0.14.3</h3>
<ul>
<li>Support for <strong>define()</strong>. It works the same as <strong>require.def()</strong>. It is supported in order to conform with the <a href="http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition">Asynchronous Module Proposal</a>. require.def will continue to work, but you are encouraged to gradually migrate to define() for better compatibly with other Async Module loaders.</li>
<li>text! plugin now works in Node.</li>
<li><em>_dirname and _</em>filename support in the r.js Node adapter.</li>
<li><a href="http://github.com/jrburke/requirejs/commit/79188c726f90aefa34a16435e929a7bb98098358">Bug fix for priority option</a>.</li>
<li>GPL license option removed: project is now just MIT and new BSD dual-licensed, since the new BSD license is compatible with the GPL.</li>
</ul>
<h3>0.14.2</h3>
<ul>
<li>Bug fixes:
<ul>
<li><a href="http://github.com/jrburke/requirejs/commit/079e8b1e0abd4b77f0cd898c4bd77f24581942f5">Fix issue with "module" dependency</a> not correctly assigning exported value if it is <em>not</em> listed as the last dependency.</li>
<li><a href="http://github.com/jrburke/requirejs/commit/e89c6c1523ac59e7303407d506f8e2ce75cdeb31">Fix "packages" config option</a>. Its behavior was fixed to match the docs.</li>
<li><a href="http://github.com/jrburke/requirejs/commit/416f24a6f556c0d96f9fd9d4146a9ecfcd337668">Fix module-to-name resolution</a> to account for package mappings.</li>
</ul></li>
</ul>
<h3>0.14.1</h3>
<ul>
<li>Bug fixes:
<ul>
<li><a href="http://github.com/jrburke/requirejs/issues#issue/13">Issue 13</a>: convertCommonJs.sh failed copying non-JS files)</li>
<li><a href="http://github.com/jrburke/requirejs/issues#issue/14">Issue 14</a>: exports not available when no require calls)</li>
<li><a href="http://github.com/jrburke/requirejs/commit/c5500f135bdb006cd963d245d9d30519a7cb3945">Fix for deeply cyclic dependencies</a>.</li>
</ul></li>
</ul>
<h3>0.14.0</h3>
<ul>
<li><a href="http://tagneto.blogspot.com/2010/09/anonymous-module-support-in-requirejs.html">Anonymous modules support</a>, <a href="http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition">CommonJS Asynchronous Module proposal</a> supported.</li>
<li><a href="api.html#packages">Loading modules from CommonJS packages</a>.</li>
<li><a href="http://github.com/jrburke/requirejs/commits/master">Bug fixes</a> (see commits starting from (see commits starting from 2010-09-15 through 2010-09-26))</li>
</ul>
<h3>0.13.0</h3>
<ul>
<li>module.setExports and module.exports are now supported for converted CommonJS modules.</li>
<li><a href="http://github.com/jrburke/requirejs/commits/master">Bug fixes</a> (see commits starting from 2010-07-05 through 2010-09-10), in particular <a href="http://github.com/jrburke/requirejs/commit/d12935bac803bcd5981652584102282b69fdd7b1">a fix to throw when a timeout for a script occurs</a>. That fix should make debugging issues much easier.</li>
</ul>
<h3>0.12.0</h3>
<ul>
<li>A new plugin: <a href="api.html#order">order</a> -- it ensures that scripts are fetched asynchronously and in parallel, but executed in the order specified in the call to require(). Ideal for traditional browser scripts that do not participate in modules defined via calls to require.def().</li>
<li><a href="api.html#webworker">Web Worker support</a>. RequireJS can be used in a web worker.</li>
<li>Multiple module names can now be mapped via the <strong>paths</strong> config option to the same URL, and that URL will only be fetched once.</li>
<li>Added Firefox 2 to supported browsers. Safari 3.2 also works with require().</li>
<li><a href="http://github.com/jrburke/requirejs/commits/master">Bug fixes</a> (see commits starting from 2010-05-25 through 2010-07-04), in particular <a href="http://github.com/jrburke/requirejs/commit/c3ae5e96f0aadd549f30a4019fe021c057e76f50">a fix for the priority config</a>, and <a href="http://github.com/jrburke/requirejs/commit/98d418fe4e4503575cca18b73260c0ab74f365fc">improved support in IE with a bad base tag</a>.</li>
</ul>
</div>