You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li>A <ahref="plugins.html">full plugin API</a> that supports also including plugin loaded artifacts in optimized builds.</li>
24
-
<li><ahref="node.html">Robust Node support</a>: now can use npm-installed modules, .node add-ons, and modules on require.paths.</li>
25
-
<li>Support for <ahref="optimization.html#hasjs">has.js optimizations</a> in the optimizer, including dead code branch removal via Closure Compiler.</a>
26
-
<li><ahref="https://github.com/jrburke/requirejs/commits/">Bug Fixes from 2010-12-21 through 2011-01-05</a>.</li>
23
+
<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>
24
+
<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>
25
+
<li><ahref="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 <ahref="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>
26
+
<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
27
+
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>
28
+
<li>The r.js adapter now works in Node and Rhino.</li>
29
+
<li>The config option, <strong>baseUrlMatch</strong> has been removed, since the data-main baseUrl rule mentioned above removes the need for it.</li>
30
+
<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>
31
+
<li>A fix for the use of jQuery's readyWait capability when jQuery is detected and used as a module.</li>
32
+
<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>
<p>A zip file containing a build of jQuery with integrated require() support, with an sample project included to show how it can be used when using jQuery.</p>
@@ -83,13 +89,13 @@ <h4 class="hbox">
83
89
<divclass="subSection">
84
90
<h4><aname="node">RequireJS adapter for Node and Rhino</a></h4>
85
91
86
-
<p><strong><ahref="http://requirejs.org/docs/release/0.22.0/r.js">r.js</a></strong>: use this file if you want to code to the RequireJS module format in Node or Rhino.</p>
92
+
<p><strong><ahref="http://requirejs.org/docs/release/0.23.0/r.js">r.js</a></strong>: use this file if you want to code to the RequireJS module format in Node or Rhino.</p>
87
93
88
94
<p><strong>Use in Node</strong></p>
89
95
90
96
<p>Requires Node 0.4.0 or higher. The <ahref="node.html">Node instructions</a> explain how to use it. It includes all the code needed for RequireJS to function with Node.</p>
91
97
92
-
<p><strong><ahref="http://requirejs.org/docs/release/0.22.0/node/index.js">index.js</a></strong>: the standard HTTP server-based Hello World app for Node, but coded to work with the r.js adapter. Download it in the same directory as r.js and then run this command:</p>
98
+
<p><strong><ahref="http://requirejs.org/docs/release/0.23.0/node/index.js">index.js</a></strong>: the standard HTTP server-based Hello World app for Node, but coded to work with the r.js adapter. Download it in the same directory as r.js and then run this command:</p>
93
99
94
100
<pre><code>node r.js index.js
95
101
</code></pre>
@@ -109,7 +115,7 @@ <h4><a name="node">RequireJS adapter for Node and Rhino</a></h4>
109
115
<h4class="hbox">
110
116
<aname="optimizationtool">Optimization Tool / Full Source</a>
<li>A <ahref="plugins.html">full plugin API</a> that supports also including plugin loaded artifacts in optimized builds.</li>
133
+
<li><ahref="node.html">Robust Node support</a>: now can use npm-installed modules, .node add-ons, and modules on require.paths.</li>
134
+
<li>Support for <ahref="optimization.html#hasjs">has.js optimizations</a> in the optimizer, including dead code branch removal via Closure Compiler.</a>
135
+
<li><ahref="https://github.com/jrburke/requirejs/commits/">Bug Fixes from 2010-12-21 through 2011-01-05</a>.</li>
0 commit comments