8000 updating docs for a 0.25.0 release. · xcoderzach/requirejs@9973549 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9973549

Browse files
committed
updating docs for a 0.25.0 release.
1 parent 35bdc53 commit 9973549

File tree

11 files changed

+57
-151
lines changed

11 files changed

+57
-151
lines changed

dist/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ When doing a release, do the following:
1313
* post.html
1414
* Check version of cs plugin, update download.html if necessary.
1515
* Check version of jQuery in the jQuery sample project, update the download.html if necessary.
16+
* Update version in x.js in the r.js project if necessary.
1617
* Commit/push changes
1718
* .updatesubs.sh
1819
* Commit changes to:

dist/post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
</div>
22
<div id="footer" class="mono">
3-
<span class="line">Latest Release: <a href="http://requirejs.org/docs/download.html">0.24.0</a></span>
3+
<span class="line">Latest Release: <a href="http://requirejs.org/docs/download.html">0.25.0</a></span>
44
<span class="line">Open source: new BSD or MIT licensed</span>
55
<span class="line">web design by <a href="http://andychung.ca">Andy Chung</a> &copy; 2011</span>
66
</div>

dist/pre.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ <h1>a javascript module loader</h1>
161161
</ul>
162162

163163
<ul>
164-
<li class="version">0.24.0 Docs</li>
164+
<li class="version">0.25.0 Docs</li>
165165
</ul>
166166
</div>
167167

docs/api.html

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -899,22 +899,6 @@ <h3><a name="webworker">Web Worker Support</a><span class="sectionMark">&sect; 5
899899

900900
<h3><a name="rhino">Rhino Support</a><span class="sectionMark">&sect; 5.5</span></h3>
901901

902-
<p>RequireJS can be used in Rhino via the <a href="download.html#rjs">r.js adapter</a>. Run it like so:</p>
903-
904-
<pre><code>java -jar path/to/rhino/js.jar r.js main.js
905-
</code></pre>
906-
907-
<p>Where main.js has contents that look like this:</p>
908-
909-
<pre><code>//Set up any config values, baseUrl is required so module names
910-
//will map correctly to paths.
911-
require({
912-
baseUrl: 'path/to/scripts'
913-
});
914-
915-
//Now load the top level script.
916-
require(['startingscript']);
917-
</code></pre>
918-
919-
<p>You can see an example of RequireJS working in Rhino by looking at <a href="http://github.com/jrburke/requirejs/blob/master/adapt/tests/all.js">adapt/tests/all.js</a>.</p>
902+
<p>RequireJS can be used in Rhino via the <a href="download.html#rjs">r.js adapter</a>.
903+
See <a href="https://github.com/jrburke/r.js/blob/master/README.md">the r.js README</a> for more information.</p>
920904
</div>

docs/download.html

Lines changed: 40 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h1>Download RequireJS</h1>
44
<li class="hbox"><a href="#latest">Latest Release</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1</span></li>
55
<ul>
66
<li class="hbox"><a href="#requirejs">require.js</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.1</span></li>
7-
<li class="hbox"><a href="#samplejquery">Sample RequireJS + jQuery 1.5.1 project</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.2</span></li>
7+
<li class="hbox"><a href="#samplejquery">Sample RequireJS + jQuery 1.6.2 project</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.2</span></li>
88
<li class="hbox"><a href="#rjs">r.js: Optimizer and Node and Rhino adapter</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.3</span></li>
99
</ul>
1010
<li class="hbox"><a href="#previous">Plugins</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span></li>
@@ -24,20 +24,20 @@ <h2><a name="latest">Latest Release</a><span class="sectionMark">&sect; 1</span>
2424

2525
<div class="subSection">
2626
<h4 class="hbox">
27-
<a name="requirejs">require.js 0.24.0</a>
27+
<a name="requirejs">require.js 0.25.0</a>
2828
<span class="boxFlex"></span>
29-
<a class="download" href="http://requirejs.org/docs/release/0.24.0/minified/require.js">Minified</a>
30-
<a class="download" href="http://requirejs.org/docs/release/0.24.0/comments/require.js">With Comments</a>
29+
<a class="download" href="http://requirejs.org/docs/release/0.25.0/minified/require.js">Minified</a>
30+
<a class="download" href="http://requirejs.org/docs/release/0.25.0/comments/require.js">With Comments</a>
3131
</h4>
3232

3333
<p>All you need to start using require.js in the browser.</p>
3434
</div>
3535

3636
<div class="subSection">
3737
<h4 class="hbox">
38-
<a name="samplejquery">Sample RequireJS 0.24.0 + jQuery 1.5.2 project</a>
38+
<a name="samplejquery">Sample RequireJS 0.25.0 + jQuery 1.6.2 project</a>
3939
<span class="boxFlex"></span>
40-
<a class="download" href="http://requirejs.org/docs/release/jquery-require/jquery1.5.2-requirejs0.24.0/jquery-require-sample.zip">Download</a>
40+
<a class="download" href="http://requirejs.org/docs/release/jquery-require/jquery1.6.2-requirejs0.25.0/jquery-require-sample.zip">Download</a>
4141
</h4>
4242

4343
<p>A zip file containing a sample project that uses jQuery and RequireJS.</p>
@@ -66,8 +66,8 @@ <h2><a name="plugins">Plugins</a><span class="sectionMark">&sect; 2</span></h2>
6666
<h4 class="hbox">
6767
<a name="text">text</a>
6868
<span class="boxFlex"></span>
69-
<a class="download" href="http://requirejs.org/docs/release/0.24.0/minified/text.js">Minified</a>
70-
<a class="download" href="http://requirejs.org/docs/release/0.24.0/comments/text.js">With Comments</a>
69+
<a class="download" href="http://requirejs.org/docs/release/0.25.0/minified/text.js">Minified</a>
70+
<a class="download" href="http://requirejs.org/docs/release/0.25.0/comments/text.js">With Comments</a>
7171
</h4>
7272
<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>
7373
</div>
@@ -76,8 +76,8 @@ <h4 class="hbox">
7676
<h4 class="hbox">
7777
<a name="order">order</a>
7878
<span class="boxFlex"></span>
79-
<a class="download" href="http://requirejs.org/docs/release/0.24.0/minified/order.js">Minified</a>
80-
<a class="download" href="http://requirejs.org/docs/release/0.24.0/comments/order.js">With Comments</a>
79+
<a class="download" href="http://requirejs.org/docs/release/0.25.0/minified/order.js">Minified</a>
80+
<a class="download" href="http://requirejs.org/docs/release/0.25.0/comments/order.js">With Comments</a>
8181
</h4>
8282
<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>
8383
</div>
@@ -97,8 +97,8 @@ <h4 class="hbox">
9797
<h4 class="hbox">
9898
<a name="i18n">i18n</a>
9999
<span class="boxFlex"></span>
100-
<a class="download" href="http://requirejs.org/docs/release/0.24.0/minified/i18n.js">Minified</a>
101-
<a class="download" href="http://requirejs.org/docs/release/0.24.0/comments/i18n.js">With Comments</a>
100+
<a class="download" href="http://requirejs.org/docs/release/0.25.0/minified/i18n.js">Minified</a>
101+
<a class="download" href="http://requirejs.org/docs/release/0.25.0/comments/i18n.js">With Comments</a>
102102
</h4>
103103
<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>
104104
</div>
@@ -108,6 +108,34 @@ <h4 class="hbox">
108108
<div class="section">
109109
<h2><a name="releasenotes">Release Notes</a><span class="sectionMark">&sect; 3</span></h2>
110110

111+
112+
<h3 id="0-25-0">0.25.0</h3>
113+
114+
<p>The awesome part: the optimizer is now just one JS file! It also doubles as a bootstrap script that supports the full capability of AMD modules and loader plugins in Node and in Rhino.</p>
115+
116+
<p>To use the optimizer, pass the "-o" option to r.js:</p>
117+
118+
<pre> node r.js -o app.build.js</pre>
119+
120+
<p>To run your AMD-based project via the adapter (assuming server.js is your top-level AMD module):</p>
121+
122+
<pre> node r.js server.js</pre>
123+
124+
<p>There is more information about <a href="http://requirejs.org/docs/node.html">running AMD modules in Node</a>. The <a href="http://requirejs.org/docs/optimization.html">optimizer docs</a> have been updated to the new optimizer syntax, and the r.js script has <a href="https://github.com/jrburke/r.js">its own project now</a>, to allow releases that are decoupled from require.js.</p>
125+
126+
<p>Other highlights:</p>
127+
128+
<ul><li>The loader plugin API changed to allow plugins to create cross-domain-accessible re F438 sources. The main use case: you use the text plugin to dynamically load text resources, but you want to deploy those scripts to a CDN. See the <a href="http://requirejs.org/docs/download.html#text">text plugin</a>'s implementation of writeFile() as an example.
129+
</li><li>There is now a global <span style="font-weight: bold;">requirejs()</span> function object that is the same as the old global <span style="font-weight: bold;">require()</span> function object. This should allow RequireJS to work better in environments like <a href="http://mozillalabs.com/chromeless/">Mozilla Chromeless</a>, which already have a built-in require() function that does not have full AMD/loader plugin capabilities.
130+
</li><li>It is now possible to <a href="http://requirejs.org/docs/api.html#config-jQuery">specify the precise version of jQuery</a> to allow in a RequireJS context. This is useful if you know of other scripts that load different versions of jQuery on a page.</li></ul>
131+
132+
<p>Some changes in the name of compatibility with other AMD module loaders and Node:</p>
133+
134+
135+
<ul><li>The "lib" directory configuration in package support was removed. It was always very awkward to support, and Node no longer supports it, so it was enough justification to remove it.</li><li>Relative module IDs are now relative to the related module ID, not the related module ID path.</li><li>includeRequire in the optimizer config was removed, Use a paths config to include require.js instead. See the Optimization docs for more details.</li></ul>
136+
137+
<p>A small change to the context-specific require() passed to <a href="http://requirejs.org/docs/plugins.html#apiload">a loader plugin's load() call</a>: require.isDefined() is now require.defined() and there is require. specified().</p>
138+
111139
<h3>0.24.0</h3>
112140

113141
<ul>
@@ -146,104 +174,4 @@ <h3>0.22.0</h3>
146174
<li>Support for <a href="optimization.html#hasjs">has.js optimizations</a> in the optimizer, including dead code branch removal via Closure Compiler.</a>
147175
<li><a href="https://github.com/jrburke/requirejs/commits/">Bug Fixes from 2010-12-21 through 2011-01-05</a>.</li>
148176
</ul>
149-
150-
<h3>0.2.1 (should have been 0.21.0)</h3>
151-
152-
<ul>
153-
<li>[Bug Fixes from 2010-12-16 through 2010-12-19](https://github.com/jrburke/requirejs/commits/)</li>
154-
</ul>
155-
156-
<h3>0.2.0 (should have been 0.20.0)</h3>
157-
158-
<ul>
159-
<li>Refactored core.</li>
160-
<li>New loader plugin API support.</li>
161-
<li>Improved Rhino and Node adapters</li>
162-
<li>Bug fixes around loader plugins and the optimizer.</li>
163-
<li>require.modify removed.</li>
164-
<li>Removed Transport D files.</li>
165-
</ul>
166-
167-
<h3>0.15.0</h3>
168-
169-
<ul>
170-
<li>The bundled jQuery options now use jQuery 1.4.4.</li>
171-
<li>The jQuery sample project now includes the ability to use RequireJS plugins.</li>
172-
<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>
173-
<li>The optimizer can now be run from any directory, not just the directory with the build profile.</li>
174-
<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>
175-
<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>
176-
<li>Miscellaneous fixes, some listed in <a href="https://github.com/jrburke/requirejs/issues/closed#sort=updated">the issue tracker</a>.</li>
177-
</ul>
178-
179-
<h3>0.14.5</h3>
180-
181-
<ul>
182-
<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>
183-
<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>
184-
</ul>
185-
186-
<h3>0.14.4</h3>
187-
188-
<ul>
189-
<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>
190-
<li>Remove the Transport D pre-built option from the download page. The Transport D adapter is still in the source bundler though.</li>
191-
</ul>
192-
193-
<h3>0.14.3</h3>
194-
195-
<ul>
196-
<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>
197-
<li>text! plugin now works in Node.</li>
198-
<li><em>_dirname and _</em>filename support in the r.js Node adapter.</li>
199-
<li><a href="http://github.com/jrburke/requirejs/commit/79188c726f90aefa34a16435e929a7bb98098358">Bug fix for priority option</a>.</li>
200-
<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>
201-
</ul>
202-
203-
<h3>0.14.2</h3>
204-
205-
<ul>
206-
<li>Bug fixes:
207-
<ul>
208-
<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>
209-
<li><a href="http://github.com/jrburke/requirejs/commit/e89c6c1523ac59e7303407d506f8e2ce75cdeb31">Fix "packages" config option</< AE9B /span>a>. Its behavior was fixed to match the docs.</li>
210-
<li><a href="http://github.com/jrburke/requirejs/commit/416f24a6f556c0d96f9fd9d4146a9ecfcd337668">Fix module-to-name resolution</a> to account for package mappings.</li>
211-
</ul></li>
212-
</ul>
213-
214-
<h3>0.14.1</h3>
215-
216-
<ul>
217-
<li>Bug fixes:
218-
<ul>
219-
<li><a href="http://github.com/jrburke/requirejs/issues#issue/13">Issue 13</a>: convertCommonJs.sh failed copying non-JS files)</li>
220-
<li><a href="http://github.com/jrburke/requirejs/issues#issue/14">Issue 14</a>: exports not available when no require calls)</li>
221-
<li><a href="http://github.com/jrburke/requirejs/commit/c5500f135bdb006cd963d245d9d30519a7cb3945">Fix for deeply cyclic dependencies</a>.</li>
222-
</ul></li>
223-
</ul>
224-
225-
<h3>0.14.0</h3>
226-
227-
<ul>
228-
<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>
229-
<li><a href="api.html#packages">Loading modules from CommonJS packages</a>.</li>
230-
<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>
231-
</ul>
232-
233-
<h3>0.13.0</h3>
234-
235-
<ul>
236-
<li>module.setExports and module.exports are now supported for converted CommonJS modules.</li>
237-
<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>
238-
</ul>
239-
240-
<h3>0.12.0</h3>
241-
242-
<ul>
243-
<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>
244-
<li><a href="api.html#webworker">Web Worker support</a>. RequireJS can be used in a web worker.</li>
245-
<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>
246-
<li>Added Firefox 2 to supported browsers. Safari 3.2 also works with require().</li>
247-
<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>
248-
</ul>
249177
</div>

docs/node.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ <h2>
2222
</h2>
2323

2424
<p>Yes <a href="http://nodejs.org">Node</a> does. That loader uses the CommonJS module format. The CommonJS module format is <a href="why.html">non-optimal for the browser</a>, and I do not agree with <a href="http://tagneto.blogspot.com/2010/03/commonjs-module-trade-offs.html">some of the trade-offs made in the CommonJS module format</a>. By using RequireJS on the server, you can use one format for all your modules, whether they are running server side or in the browser. That way you can preserve the speed benefits and easy debugging you get with RequireJS in the browser, and not have to worry about extra translation costs for moving between two formats.</p>
25+
26+
<p>The situation has improved a bit in Node 0.5.0 and later, which supports the <a href="commonjs.html#manualconversion">"simplified CommonJS wrapper" version of define()</a>. While this is helpful for some base library purposes, it does not include support for <a href="api.html#defdep">dependency arrays in define()</a> or <a href="plugins.html">loader plugins</a>. So using the r.js RequireJS adapter is useful for making sure your code will run as you expect across browser and Node environments.</p>
27+
2528
</div>
2629

2730
<div class="section">

i18n.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license RequireJS i18n 0.24.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
2+
* @license RequireJS i18n 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
33
* Available via the MIT or new BSD license.
44
* see: http://github.com/jrburke/requirejs for details
55
*/
@@ -79,7 +79,7 @@
7979
}
8080

8181
define({
82-
version: '0.24.0',
82+
version: '0.25.0',
8383
/**
8484
* Called when a dependency needs to be loaded.
8585
*/

order.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license RequireJS order 0.24.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
2+
10000 * @license RequireJS order 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
33
* Available via the MIT or new BSD license.
44
* see: http://github.com/jrburke/requirejs for details
55
*/
@@ -85,7 +85,7 @@
8585
}
8686

8787
define({
88-
version: '0.24.0',
88+
version: '0.25.0',
8989

9090
load: function (name, req, onLoad, config) {
9191
var url = req.nameToUrl(name, null);

require.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** vim: et:ts=4:sw=4:sts=4
2-
* @license RequireJS 0.24.0+ Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
2+
* @license RequireJS 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
33
* Available via the MIT or new BSD license.
44
* see: http://github.com/jrburke/requirejs for details
55
*/
@@ -11,7 +11,7 @@
1111
var requirejs, require, define;
1212
(function () {
1313
//Change this version number for each release.
14-
var version = "0.24.0+",
14+
var version = "0.25.0",
1515
commentRegExp = /(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,
1616
cjsRequireRegExp = /require\(["']([^'"\s]+)["']\)/g,
1717
currDirRegExp = /^\.\//,

tasks.txt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
Release Notes
22
-------------------
3-
- bumps in the api, moving towards interop.
4-
- Removed support for lib in packages.
5-
- relative IDs are now relative to the module ID.
6-
- isDefined is now defined() and there is a specified() that is available of of context-sensitive require.
7-
- includeRequire is removed, use paths: {requireLib: "../../require"} to get require in it.
8-
See the optimization.html for the requireLib example.
9-
- New optimizer/node/rhino adapter: r.js
10-
- support plugin resources built as separate files via the writeFile method
11-
- requirejs global object, chromeless.
12-
- amd tests, discussion on new list.
13-
- new error page diagnostics.
3+
144

155
Next release
166
--------------

0 commit comments

Comments
 (0)
0