Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Create an IE-specific style sheet, and use it to hide some things tha…

…t do not work out well in IE.
  • Loading branch information...
commit 24dbe75d0d72bd2efa652dbb124dca317d3ed976 1 parent d93e11b
@jrburke authored
View
6 dist/dist-site.js
@@ -27,11 +27,12 @@ load("../build/jslib/fileUtil.js");
var files, i, htmlFile, transFile, fileContents,
runtime = Packages.java.lang.Runtime.getRuntime(),
process, preContents, postContents, h1, homePath, cssPath,
- jsPath, length, j, isTopPage = false;
+ ieCssPath, jsPath, length, j, isTopPage = false;
//Copy all the text files to a dist directory
//fileUtil.deleteFile("./dist-site/");
fileUtil.copyFile("main.css", "./dist-site/main.css");
+fileUtil.copyFile("ie.css", "./dist-site/ie.css");
fileUtil.copyFile("init.js", "./dist-site/init.js");
fileUtil.copyDir("i/", "./dist-site/i/", /\w/);
fileUtil.copyDir("fonts", "./dist-site/fonts", /\w/);
@@ -76,6 +77,7 @@ for (i = 0; (htmlFile = files[i]); i++) {
isTopPage = true;
homePath = "./";
cssPath = "main.css";
+ ieCssPath = "ie.css";
jsPath = "init.js";
} else {
isTopPage = false;
@@ -85,10 +87,12 @@ for (i = 0; (htmlFile = files[i]); i++) {
homePath += "../";
}
cssPath = homePath + "main.css";
+ ieCssPath = homePath + "ie.css";
jsPath = homePath + "init.js";
}
fileContents = fileContents.replace(/HOMEPATH/, homePath);
fileContents = fileContents.replace(/\main\.css/, cssPath);
+ fileContents = fileContents.replace(/\ie\.css/, ieCssPath);
fileContents = fileContents.replace(/\init\.js/, jsPath);
View
9 dist/ie.css
@@ -0,0 +1,9 @@
+
+body .sect {
+ display: none;
+}
+
+
+#content ul.index {
+ list-style: none;
+}
View
29 dist/pre.html
@@ -3,6 +3,7 @@
<head>
<title>RequireJS</title>
<link rel="stylesheet" type="text/css" href="main.css">
+ <!--[if IE]> <link rel="stylesheet" type="text/css" href="ie.css" /> <![endif]-->
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojox/highlight/resources/highlight.css">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="init.js"></script>
@@ -30,9 +31,9 @@
<div id="navBg"></div>
<div id="nav" class="mono">
-
+
<h1>a javascript module loader</h1>
-
+
<ul>
<li class="hbox">
<a href="./">Home</a>
@@ -40,7 +41,7 @@
<span class="icon home"></span>
</li>
</ul>
-
+
<ul>
<li class="hbox">
<a class="local" href="start.html">Start</a>
@@ -63,7 +64,7 @@
<span class="icon optimize"></span>
</li>
</ul>
-
+
<ul>
<li class="hbox">
<a class="local" href="jquery.html">Use with jQuery</a>
@@ -81,7 +82,7 @@
<span class="icon script"></span>
</li>
</ul>
-
+
<ul>
<li class="hbox">
<a class="local" href="faq.html">FAQs</a>
@@ -89,12 +90,12 @@
<span class="icon question"></span>
</li>
</ul>
-
+
<ul>
<li class="hbox">
<a class="local" href="why.html">Why</a>
<span class="spacer boxFlex"></span>
- <span class="icon question"></span>
+ <span class="icon question"></span>
</li>
<li class="hbox">
<a class="local" href="requirements.html">Requirements</a>
@@ -107,7 +108,7 @@
<span class="icon history"></span>
</li>
</ul>
-
+
<ul>
<li class="hbox">
<a href="http://groups.google.com/group/requirejs">Get Help</a>
@@ -122,26 +123,26 @@
<li class="hbox">
<a href="http://twitter.com/jrburke">Twitter</a>
<span class="spacer boxFlex"></span>
- <span class="icon twitter"></span>
+ <span class="icon twitter"></span>
</li>
</ul>
-
+
<ul>
<li class="hbox">
<a href="http://github.com/jrburke/requirejs">GitHub</a>
<span class="spacer boxFlex"></span>
- <span class="icon git"></span>
+ <span class="icon git"></span>
</li>
<li class="hbox">
<a class="local" href="contributing.html">Contributing</a>
<span class="spacer boxFlex"></span>
- <span class="icon fork"></span>
+ <span class="icon fork"></span>
</li>
</ul>
-
+
<ul>
<li class="version">0.15.0 Docs</li>
</ul>
</div>
-
+
<div id="content">
View
56 docs/api.html
@@ -2,39 +2,39 @@
<h1>RequireJS API</h1>
<ul class="index mono">
- <li class="hbox"><a href="#usage">Usage</a><span class="spacer boxFlex"></span><span>&sect;&sect; 1-1.7</span></li>
+ <li class="hbox"><a href="#usage">Usage</a><span class="spacer boxFlex"></span><span class="sect">&sect;&sect; 1-1.7</span></li>
<ul>
- <li class="hbox"><a href="#jsfiles">Loading JavaScript Files</a><span class="spacer boxFlex"></span><span>&sect; 1.1</span></li>
- <li class="hbox"><a href="#define">Defining a Module</a><span class="spacer boxFlex"></span><span>&sect; 1.2</span></li>
+ <li class="hbox"><a href="#jsfiles">Loading JavaScript Files</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.1</span></li>
+ <li class="hbox"><a href="#define">Defining a Module</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.2</span></li>
<ul>
- <li class="hbox"><a href="#defsimple">Simple Name/Value Pairs</a><span class="spacer boxFlex"></span><span>&sect; 1.2.1</span></li>
- <li class="hbox"><a href="#deffunc">Definition Functions</a><span class="spacer boxFlex"></span><span>&sect; 1.2.2</span></li>
- <li class="hbox"><a href="#defdep">Definition Functions with Dependencies</a><span class="spacer boxFlex"></span><span>&sect; 1.2.3</span></li>
- <li class="hbox"><a href="#funcmodule">Defining a Module as a Function</a><span class="spacer boxFlex"></span><span>&sect; 1.2.4</span></li>
- <li class="hbox"><a href="#modulename">Defining a Module with a name</a><span class="spacer boxFlex"></span><span>&sect; 1.2.5</span></li>
- <li class="hbox"><a href="#modulenotes">Other Module Notes</a><span class="spacer boxFlex"></span><span>&sect; 1.2.6</span></li>
- <li class="hbox"><a href="#circular">Circular Dependencies</a><span class="spacer boxFlex"></span><span>&sect; 1.2.7</span></li>
+ <li class="hbox"><a href="#defsimple">Simple Name/Value Pairs</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.2.1</span></li>
+ <li class="hbox"><a href="#deffunc">Definition Functions</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.2.2</span></li>
+ <li class="hbox"><a href="#defdep">Definition Functions with Dependencies</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.2.3</span></li>
+ <li class="hbox"><a href="#funcmodule">Defining a Module as a Function</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.2.4</span></li>
+ <li class="hbox"><a href="#modulename">Defining a Module with a name</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.2.5</span></li>
+ <li class="hbox"><a href="#modulenotes">Other Module Notes</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.2.6</span></li>
+ <li class="hbox"><a href="#circular">Circular Dependencies</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.2.7</span></li>
</ul>
- <li class="hbox"><a href="#i18n">Define an I18N Bundle</a><span class="spacer boxFlex"></span><span>&sect; 1.3</span></li>
- <li class="hbox"><a href="#text">Specify a Text File Dependency</a><span class="spacer boxFlex"></span><span>&sect; 1.4</span></li>
- <li class="hbox"><a href="#jsonp">Specify a JSONP Service Dependency</a><span class="spacer boxFlex"></span><span>&sect; 1.5</span></li>
- <li class="hbox"><a href="#order">Load Scripts in a Specific Order</a><span class="spacer boxFlex"></span><span>&sect; 1.6</span></li>
+ <li class="hbox"><a href="#i18n">Define an I18N Bundle</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.3</span></li>
+ <li class="hbox"><a href="#text">Specify a Text File Dependency</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.4</span></li>
+ <li class="hbox"><a href="#jsonp">Specify a JSONP Service Dependency</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.5</span></li>
+ <li class="hbox"><a href="#order">Load Scripts in a Specific Order</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.6</span></li>
</ul>
- <li class="hbox"><a href="#mechanics">Mechanics</a><span class="spacer boxFlex"></span><span>&sect; 2</span></li>
- <li class="hbox"><a href="#config">Configuration Options</a><span class="spacer boxFlex"></span><span>&sect; 3</span></li>
- <li class="hbox"><a href="#pageload">Page Load Event Support</a><span class="spacer boxFlex"></span><span>&sect; 4</span></li>
- <li class="hbox"><a href="#advanced">Advanced Usage</a><span class="spacer boxFlex"></span><span>&sect;&sect; 5-5.6</span></li>
+ <li class="hbox"><a href="#mechanics">Mechanics</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span></li>
+ <li class="hbox"><a href="#config">Configuration Options</a><span class="spacer boxFlex"></span><span class="sect">&sect; 3</span></li>
+ <li class="hbox"><a href="#pageload">Page Load Event Support</a><span class="spacer boxFlex"></span><span class="sect">&sect; 4</span></li>
+ <li class="hbox"><a href="#advanced">Advanced Usage</a><span class="spacer boxFlex"></span><span class="sect">&sect;&sect; 5-5.6</span></li>
<ul>
- <li class="hbox"><a href="#packages">Loading Modules from Packages</a><span class="spacer boxFlex"></span><span>&sect; 5.1</span></li>
- <li class="hbox"><a href="#multiversion">Multiversion Support</a><span class="spacer boxFlex"></span><span>&sect; 5.2</span></li>
- <li class="hbox"><a href="#afterload">Loading Code After Page Load</a><span class="spacer boxFlex"></span><span>&sect; 5.3</span></li>
- <li class="hbox"><a href="#modifiers">Module Modifiers</a><span class="spacer boxFlex"></span><span>&sect; 5.4</span></li>
+ <li class="hbox"><a href="#packages">Loading Modules from Packages</a><span class="spacer boxFlex"></span><span class="sect">&sect; 5.1</span></li>
+ <li class="hbox"><a href="#multiversion">Multiversion Support</a><span class="spacer boxFlex"></span><span class="sect">&sect; 5.2</span></li>
+ <li class="hbox"><a href="#afterload">Loading Code After Page Load</a><span class="spacer boxFlex"></span><span class="sect">&sect; 5.3</span></li>
+ <li class="hbox"><a href="#modifiers">Module Modifiers</a><span class="spacer boxFlex"></span><span class="sect">&sect; 5.4</span></li>
<ul>
- <li class="hbox"><a href="#modregister">Modifier Registration</a><span class="spacer boxFlex"></span><span>&sect; 5.4.1</span></li>
- <li class="hbox"><a href="#moddef">Modifier Definition</a><span class="spacer boxFlex"></span><span>&sect; 5.4.2</span></li>
+ <li class="hbox"><a href="#modregister">Modifier Registration</a><span class="spacer boxFlex"></span><span class="sect">&sect; 5.4.1</span></li>
+ <li class="hbox"><a href="#moddef">Modifier Definition</a><span class="spacer boxFlex"></span><span class="sect">&sect; 5.4.2</span></li>
</ul>
- <li class="hbox"><a href="#webworker">Web Worker Support</a><span class="spacer boxFlex"></span><span>&sect; 5.5</span></li>
- <li class="hbox"><a href="#rhino">Rhino Support</a><span class="spacer boxFlex"></span><span>&sect; 5.6</span></li>
+ <li class="hbox"><a href="#webworker">Web Worker Support</a><span class="spacer boxFlex"></span><span class="sect">&sect; 5.5</span></li>
+ <li class="hbox"><a href="#rhino">Rhino Support</a><span class="spacer boxFlex"></span><span class="sect">&sect; 5.6</span></li>
</ul>
</ul>
</div>
@@ -380,7 +380,7 @@
<pre><code>require(["some/module", "text!some/module.html", "text!some/module.css"],
function(module, html, css) {
//the html variable will be the text of the some/module.html file
- //the css variable will be the text of the som/module.css file.
+ //the css variable will be the text of the som/module.css file.
}
);
</code></pre>
@@ -392,7 +392,7 @@
<pre><code>require(["text!some/module.html!strip"],
function(html) {
//the html variable will be the text of the some/module.html file,
- //but only the part inside the body tag.
+ //but only the part inside the body tag.
}
);
</code></pre>
View
17 docs/commonjs.html
@@ -2,13 +2,13 @@
<h1>CommonJS Notes</h1>
<ul class="index mono">
-<li class="hbox"><a href="#intro">Introduction</a><span class="spacer boxFlex"></span><span>&sect; 1</span></li>
-<li class="hbox"><a href="#manualconversion">Manual Conversion</a><span class="spacer boxFlex"></span><span>&sect; 2</span></li>
-<li class="hbox"><a href="#autoconversion">Conversion Tool</a><span class="spacer boxFlex"></span><span>&sect; 3</span></li>
-<li class="hbox"><a href="#exports">Setting Exported Value</a><span class="spacer boxFlex"></span><span>&sect; 4</span></li>
-<li class="hbox"><a href="#altsyntax">Alternative Syntax</a><span class="spacer boxFlex"></span><span>&sect; 5</span></li>
-<li class="hbox"><a href="packages">Loading Modules from CommonJS Packages</a><span class="spacer boxFlex"></span><span>&sect; 6</span></li>
-<li class="hbox"><a href="#optimize">Optimization Tool</a><span class="spacer boxFlex"></span><span>&sect; 7</span></li>
+<li class="hbox"><a href="#intro">Introduction</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1</span></li>
+<li class="hbox"><a href="#manualconversion">Manual Conversion</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span></li>
+<li class="hbox"><a href="#autoconversion">Conversion Tool</a><span class="spacer boxFlex"></span><span class="sect">&sect; 3</span></li>
+<li class="hbox"><a href="#exports">Setting Exported Value</a><span class="spacer boxFlex"></span><span class="sect">&sect; 4</span></li>
+<li class="hbox"><a href="#altsyntax">Alternative Syntax</a><span class="spacer boxFlex"></span><span class="sect">&sect; 5</span></li>
+<li class="hbox"><a href="packages">Loading Modules from CommonJS Packages</a><span class="spacer boxFlex"></span><span class="sect">&sect; 6</span></li>
+<li class="hbox"><a href="#optimize">Optimization Tool</a><span class="spacer boxFlex"></span><span class="sect">&sect; 7</span></li>
</ul>
</div>
@@ -28,7 +28,7 @@
<p>If you just have a few modules to convert, then all you need to do is wrap the module in this code:</p>
-<pre><code>define(function(require, exports, module) {
+<pre><code>define(function(require, exports, module) {
//Put traditional CommonJS module content here
});
</code></pre>
@@ -88,4 +88,3 @@
<p>RequireJS has an optimization tool that can combine module definitions together into optimized bundles for browser delivery. It works as a command-line tool that you use as part of code deployment. See the <a href="optimization.html">optimization docs</a> for more information.</p>
</div>
-
View
4 docs/contributing.html
@@ -2,8 +2,8 @@
<h1>Contributing to RequireJS</h1>
<ul class="index mono">
-<li class="hbox"><a href="#whycla">Why a CLA?</a><span class="spacer boxFlex"></span><span>&sect; 1</span></li>
-<li class="hbox"><a href="#codestyle">Code style</a><span class="spacer boxFlex"></span><span>&sect; 2</span></li>
+<li class="hbox"><a href="#whycla">Why a CLA?</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1</span></li>
+<li class="hbox"><a href="#codestyle">Code style</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span></li>
</ul>
<span class="note">Note: <a href="http://github.com/jrburke/requirejs">The source for RequireJS is available on GitHub</a></span>
View
30 docs/download.html
@@ -1,16 +1,16 @@
<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>&sect; 1</span></li>
+ <li class="hbox"><a href="#latest">Latest Release</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1</span></li>
<ul>
- <li class="hbox"><a href="#requirejs">require.js</a><span class="spacer boxFlex"></span><span>&sect; 1.1</span></li>
- <li class="hbox"><a href="#requirejsplugins">require.js with plugins</a><span class="spacer boxFlex"></span><span>&sect; 1.2</span></li>
- <li class="hbox"><a href="#jqueryrequirejs">jQuery 1.4.4 with require()</a><span class="spacer boxFlex"></span><span>&sect; 1.3</span></li>
- <li class="hbox"><a href="#jqueryrequirejsplugins">jQuery 1.4.4 with require() and plugins</a><span class="spacer boxFlex"></span><span>&sect; 1.4</span></li>
- <li class="hbox"><a href="#samplejquery">Sample jQuery 1.4.4 project with require()</a><span class="spacer boxFlex"></span><span>&sect; 1.5</span></li>
- <li class="hbox"><a href="#node">RequireJS adapter for Node</a><span class="spacer boxFlex"></span><span>&sect; 1.6</span></li>
+ <li class="hbox"><a href="#requirejs">require.js</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.1</span></li>
+ <li class="hbox"><a href="#requirejsplugins">require.js with plugins</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.2</span></li>
+ <li class="hbox"><a href="#jqueryrequirejs">jQuery 1.4.4 with require()</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.3</span></li>
+ <li class="hbox"><a href="#jqueryrequirejsplugins">jQuery 1.4.4 with require() and plugins</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.4</span></li>
+ <li class="hbox"><a href="#samplejquery">Sample jQuery 1.4.4 project with require()</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.5</span></li>
+ <li class="hbox"><a href="#node">RequireJS adapter for Node</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.6</span></li>
</ul>
- <li class="hbox"><a href="#previous">Previous Releases</a><span class="spacer boxFlex"></span><span>&sect; 2</span></li>
+ <li class="hbox"><a href="#previous">Previous Releases</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span></li>
</ul>
</div>
@@ -41,7 +41,7 @@ <h4 class="hbox">
<div class="subSection">
<h4 class="hbox">
-<a name="requirejsplugins">require.js with plugins</a>
+<a name="requirejsplugins">require.js with plugins</a>
<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.15.0/minified/allplugins-require.js">Minified</a>
<a class="download" href="http://requirejs.org/docs/release/0.15.0/comments/allplugins-require.js">With Comments</a>
@@ -52,7 +52,7 @@ <h4 class="hbox">
<div class="subSection">
<h4 class="hbox">
-<a name="jqueryrequirejs">jQuery 1.4.4 with require()</a>
+<a name="jqueryrequirejs">jQuery 1.4.4 with require()</a>
<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.15.0/minified/require-jquery-1.4.4.js">Minified</a>
<a class="download" href="http://requirejs.org/docs/release/0.15.0/comments/require-jquery-1.4.4.js">With Comments</a>
@@ -64,7 +64,7 @@ <h4 class="hbox">
<div class="subSection">
<h4 class="hbox">
<a name="jqueryrequirejsplugins">jQuery 1.4.4 with require() and plugins</a>
-<span class="boxFlex"></span>
+<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.15.0/minified/requireplugins-jquery-1.4.4.js">Minified</a>
<a class="download" href="http://requirejs.org/docs/release/0.15.0/comments/requireplugins-jquery-1.4.4.js">With Comments</a>
</h4>
@@ -74,8 +74,8 @@ <h4 class="hbox">
<div class="subSection">
<h4 class="hbox">
-<a name="samplejquery">Sample jQuery 1.4.4 project with require()</a>
-<span class="boxFlex"></span>
+<a name="samplejquery">Sample jQuery 1.4.4 project with require()</a>
+<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.15.0/jquery-require-sample.zip">Download</a>
</h4>
@@ -97,8 +97,8 @@ <h4 class="hbox">
<div class="subSection">
<h4 class="hbox">
-<a name="optimizationtool">Optimization Tool / Full Source</a>
-<span class="boxFlex"></span>
+<a name="optimizationtool">Optimization Tool / Full Source</a>
+<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.15.0/requirejs-0.15.0.zip">Download</a></h4>
<p>A zip file that is the optimization tool for RequireJS. It also includes the full source for require.js and its plugins.</p>
View
4 docs/faq-advanced.html
@@ -2,8 +2,8 @@
<h1>FAQ: RequireJS Advanced Usage</h1>
<ul class="index mono">
-<li class="hbox"><a href="#rename">How can I rename require?</a><span class="spacer boxFlex"></span><span>&sect; 1</span></li>
-<li class="hbox"><a href="#css">What about loading CSS?</a><span class="spacer boxFlex"></span><span>&sect; 2</span></li>
+<li class="hbox"><a href="#rename">How can I rename require?</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1</span></li>
+<li class="hbox"><a href="#css">What about loading CSS?</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span></li>
</ul>
</div>
View
4 docs/faq-optimization.html
@@ -1,8 +1,8 @@
<div id="directory" class="section">
<h1>FAQ: RequireJS Optimizations</h1>
<ul class="index mono">
-<li class="hbox"><a href="#usage">How do I use the Optimization Tool?</a><span class="spacer boxFlex"></span><span>&sect; 1</span></li>
-<li class="hbox"><a href="#priority">How can I download all script dependencies in parallel?</a><span class="spacer boxFlex"></span><span>&sect; 2</span></li>
+<li class="hbox"><a href="#usage">How do I use the Optimization Tool?</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1</span></li>
+<li class="hbox"><a href="#priority">How can I download all script dependencies in parallel?</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span></li>
</ul>
</div>
View
4 docs/faq.html
@@ -2,7 +2,7 @@
<h1>RequireJS FAQs (Frequently Asked Questions)</h1>
<ul class="index mono">
-<li class="hbox"><a href="faq-optimization.html">Optimization Tool</a><span class="spacer boxFlex"></span><span>page 1</span></li>
-<li class="hbox"><a href="faq-advanced.html">Advanced Use</a><span class="spacer boxFlex"></span><span>page 2</span></li>
+<li class="hbox"><a href="faq-optimization.html">Optimization Tool</a><span class="spacer boxFlex"></span><span class="sect">page 1</span></li>
+<li class="hbox"><a href="faq-advanced.html">Advanced Use</a><span class="spacer boxFlex"></span><span class="sect">page 2</span></li>
</ul>
</div>
View
14 docs/jquery.html
@@ -2,16 +2,16 @@
<h1>How to use RequireJS with jQuery</h1>
<ul class="index mono">
<li class="hbox">
- <a href="#1">Get Require.js</a><span class="spacer boxFlex"></span><span>&sect; 1</span>
+ <a href="#1">Get Require.js</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1</span>
</li>
<li class="hbox">
- <a href="#2">Set up your HTML page</a><span class="spacer boxFlex"></span><span>&sect; 2</span>
+ <a href="#2">Set up your HTML page</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span>
</li>
<li class="hbox">
- <a href="#3">Feel the need for speed</a><span class="spacer boxFlex"></span><span>&sect; 3</span>
+ <a href="#3">Feel the need for speed</a><span class="spacer boxFlex"></span><span class="sect">&sect; 3</span>
</li>
<li class="hbox">
- <a href="#4">See it in action</a><span class="spacer boxFlex"></span><span>&sect; 4</span>
+ <a href="#4">See it in action</a><span class="spacer boxFlex"></span><span class="sect">&sect; 4</span>
</li>
</ul>
<p>When a project reaches a certain size, managing the script modules for a project starts to get tricky. You need to be sure to sequence the scripts in the right order, and you need to start seriously thinking about combining scripts together into a bundle for deployment, so that only one or a very small number of requests are made to load the scripts.</p>
@@ -26,7 +26,7 @@
<div class="section">
<h2>
<a name="1">Get require.js</a>
-<span class="sectionMark">&sect; 1</span>
+<span class="sectionMark">&sect; 1</span>
</h2>
<p>First step is to <a href="download.md">download a build of jQuery with RequireJS built in</a>.</p>
@@ -35,7 +35,7 @@
<div class="section">
<h2>
<a name="2">Set up your HTML page</a>
-<span class="sectionMark">&sect; 2</span>
+<span class="sectionMark">&sect; 2</span>
</h2>
<p>A sample HTML page would look like this (assuming you put all your .js files in a "scripts" subdirectory):</p>
@@ -73,7 +73,7 @@
<div class="section">
<h2>
<a name="3">Feel the need for speed</a>
-<span class="sectionMark">&sect; 3</span>
+<span class="sectionMark">&sect; 3</span>
</h2>
<p>Now your page is set up to be optimized very easily. Download the RequireJS source and place it anywhere you like, preferrably somewhere outside your web development area. For the purposes of this example, the RequireJS source is placed as a sibling to the <strong>webapp</strong> directory, which contains the HTML page and the scripts directory with all the scripts. Complete directory structure:</p>
View
6 docs/node.html
@@ -3,13 +3,13 @@
<ul class="index mono">
<li class="hbox">
- <a href="#1">Doesn't Node already have a module loader?</a><span class="spacer boxFlex"></span><span>&sect; 1</span>
+ <a href="#1">Doesn't Node already have a module loader?</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1</span>
</li>
<li class="hbox">
- <a href="#2">Can I use server modules written in the CommonJS module format?</a><span class="spacer boxFlex"></span><span>&sect; 2</span>
+ <a href="#2">Can I use server modules written in the CommonJS module format?</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span>
</li>
<li class="hbox">
- <a href="#3">How do I use it?</a><span class="spacer boxFlex"></span><span>&sect; 3</span>
+ <a href="#3">How do I use it?</a><span class="spacer boxFlex"></span><span class="sect">&sect; 3</span>
</li>
</ul>
View
20 docs/optimization.html
@@ -2,14 +2,14 @@
<h1>RequireJS Optimization Tool</h1>
<ul class="index mono">
-<li class="hbox"><a href="#requirements">Requirements</a><span class="spacer boxFlex"></span><span>&sect; 1</span></li>
-<li class="hbox"><a href="#download">Download</a><span class="spacer boxFlex"></span><span>&sect; 2</span></li>
-<li class="hbox"><a href="#setup">Example Setup</a><span class="spacer boxFlex"></span><span>&sect; 3</span></li>
-<li class="hbox"><a href="#onejs">Optimizing one JavaScript file</a><span class="spacer boxFlex"></span><span>&sect; 4</span></li>
-<li class="hbox"><a href="#shallow">Shallow exclusions for fast development</a><span class="spacer boxFlex"></span><span>&sect; 5</span></li>
-<li class="hbox"><a href="#onecss">Optimizing one CSS file</a><span class="spacer boxFlex"></span><span>&sect; 6</span></li>
-<li class="hbox"><a href="#wholeproject">Optimizing a whole project</a><span class="spacer boxFlex"></span><span>&sect; 7</span></li>
-<li class="hbox"><a href="#options">All configuration options</a><span class="spacer boxFlex"></span><span>&sect; 8</span></li>
+<li class="hbox"><a href="#requirements">Requirements</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1</span></li>
+<li class="hbox"><a href="#download">Download</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span></li>
+<li class="hbox"><a href="#setup">Example Setup</a><span class="spacer boxFlex"></span><span class="sect">&sect; 3</span></li>
+<li class="hbox"><a href="#onejs">Optimizing one JavaScript file</a><span class="spacer boxFlex"></span><span class="sect">&sect; 4</span></li>
+<li class="hbox"><a href="#shallow">Shallow exclusions for fast development</a><span class="spacer boxFlex"></span><span class="sect">&sect; 5</span></li>
+<li class="hbox"><a href="#onecss">Optimizing one CSS file</a><span class="spacer boxFlex"></span><span class="sect">&sect; 6</span></li>
+<li class="hbox"><a href="#wholeproject">Optimizing a whole project</a><span class="spacer boxFlex"></span><span class="sect">&sect; 7</span></li>
+<li class="hbox"><a href="#options">All configuration options</a><span class="spacer boxFlex"></span><span class="sect">&sect; 8</span></li>
</ul>
<span class="note">Note: RequireJS comes with an optimization tool that does the following</span>
@@ -26,7 +26,7 @@
<div class="section">
<h2>
<a name="requirements">Requirements</a>
-<span class="sectionMark">&sect; 1</span>
+<span class="sectionMark">&sect; 1</span>
</h2>
<p>The optimization tool uses <a href="http://code.google.com/closure/compiler/">Google Closure Compiler</a> to do the code minification, and therefore requires <a href="http://java.com/">Java 6</a> to run.</p>
@@ -108,7 +108,7 @@
<div class="section">
<h2>
<a name="onejs">Optimizing one JavaScript file</a>
-<span class="sectionMark">&sect; 4</span>
+<span class="sectionMark">&sect; 4</span>
</h2>
<p>Use the above example setup, if you just wanted to optimize main.js, you could use this command, from inside the <strong>appdirectory/scripts</strong> directory:</p>
View
21 docs/requirements.html
@@ -3,34 +3,34 @@
<ul class="index mono">
<li class="hbox">
- <a href="#1">Get RequireJS</a><span class="spacer boxFlex"></span><span>&sect; 1</span>
+ <a href="#1">Get RequireJS</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1</span>
</li>
<li class="hbox">
- <a href="#2">Go with the grain of the browser</a><span class="spacer boxFlex"></span><span>&sect; 2</span>
+ <a href="#2">Go with the grain of the browser</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span>
</li>
<li class="hbox">
- <a href="#3">Load code before and after page load</a><span class="spacer boxFlex"></span><span>&sect; 3</span>
+ <a href="#3">Load code before and after page load</a><span class="spacer boxFlex"></span><span class="sect">&sect; 3</span>
</li>
<li class="hbox">
- <a href="#4">The loader should be able to load nested dependencies</a><span class="spacer boxFlex"></span><span>&sect; 4</span>
+ <a href="#4">The loader should be able to load nested dependencies</a><span class="spacer boxFlex"></span><span class="sect">&sect; 4</span>
</li>
<li class="hbox">
- <a href="#5">Modules need to be evaluated according to dependencies</a><span class="spacer boxFlex"></span><span>&sect; 5</span>
+ <a href="#5">Modules need to be evaluated according to dependencies</a><span class="spacer boxFlex"></span><span class="sect">&sect; 5</span>
</li>
<li class="hbox">
- <a href="#6">The module format should be compact</a><span class="spacer boxFlex"></span><span>&sect; 6</span>
+ <a href="#6">The module format should be compact</a><span class="spacer boxFlex"></span><span class="sect">&sect; 6</span>
</li>
<li class="hbox">
- <a href="#7">Have a streamlined core loader, but allow for the future</a><span class="spacer boxFlex"></span><span>&sect; 7</span>
+ <a href="#7">Have a streamlined core loader, but allow for the future</a><span class="spacer boxFlex"></span><span class="sect">&sect; 7</span>
</li>
<li class="hbox">
- <a href="#8">Allow modules to keep a clean global namespace</a><span class="spacer boxFlex"></span><span>&sect; 8</span>
+ <a href="#8">Allow modules to keep a clean global namespace</a><span class="spacer boxFlex"></span><span class="sect">&sect; 8</span>
</li>
<li class="hbox">
- <a href="#9">Load any script</a><span class="spacer boxFlex"></span><span>&sect; 9</span>
+ <a href="#9">Load any script</a><span class="spacer boxFlex"></span><span class="sect">&sect; 9</span>
</li>
<li class="hbox">
- <a href="#10">Allow for performance upgrades</a><span class="spacer boxFlex"></span><span>&sect; 10</span>
+ <a href="#10">Allow for performance upgrades</a><span class="spacer boxFlex"></span><span class="sect">&sect; 10</span>
</li>
</ul>
@@ -114,4 +114,3 @@
<p>This mainly means have a build system that can combine and optimize modules. It also means the loader should allow loading a script with multiple modules defined in it, and only fetch dependencies that are not already included in that script file.</p>
</div>
-
View
12 docs/start.html
@@ -1,25 +1,25 @@
<div id="directory" class="section">
<h1>How to get started with RequireJS</h1>
-
+
<ul class="index mono">
<li class="hbox">
- <a href="#get">Get RequireJS</a><span class="spacer boxFlex"></span><span>&sect; 1</span>
+ <a href="#get">Get RequireJS</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1</span>
</li>
<li class="hbox">
- <a href="#add">Add RequireJS</a><span class="spacer boxFlex"></span><span>&sect; 2</span>
+ <a href="#add">Add RequireJS</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span>
</li>
<li class="hbox">
- <a href="#optimize">Optimize</a><span class="spacer boxFlex"></span><span>&sect; 3</span>
+ <a href="#optimize">Optimize</a><span class="spacer boxFlex"></span><span class="sect">&sect; 3</span>
</li>
</ul>
-
+
<span class="note">Note: If you are using jQuery, there is a <a href="jquery.md">targeted jQuery tutorial</a></span>
</div>
<div class="section">
<h2>
<a name="get">Get RequireJS</a>
- <span class="sectionMark">&sect; 1</span>
+ <span class="sectionMark">&sect; 1</span>
</h2>
<p>Go to the <a href="download.md">download</a> page and get the file. There is a build of jQuery with integrated require() support too.</p>
View
18 docs/why.html
@@ -3,31 +3,31 @@
<ul class="index mono">
<li class="hbox">
- <a href="#1">The Problem</a><span class="spacer boxFlex"></span><span>&sect; 1</span>
+ <a href="#1">The Problem</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1</span>
</li>
<li class="hbox">
- <a href="#2">Solution</a><span class="spacer boxFlex"></span><span>&sect; 2</span>
+ <a href="#2">Solution</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span>
</li>
<li class="hbox">
- <a href="#3">Script loading APIs</a><span class="spacer boxFlex"></span><span>&sect; 3</span>
+ <a href="#3">Script loading APIs</a><span class="spacer boxFlex"></span><span class="sect">&sect; 3</span>
</li>
<li class="hbox">
- <a href="#4">Async vs Sync</a><span class="spacer boxFlex"></span><span>&sect; 4</span>
+ <a href="#4">Async vs Sync</a><span class="spacer boxFlex"></span><span class="sect">&sect; 4</span>
</li>
<li class="hbox">
- <a href="#5">Script loading: XHR</a><span class="spacer boxFlex"></span><span>&sect; 5</span>
+ <a href="#5">Script loading: XHR</a><span class="spacer boxFlex"></span><span class="sect">&sect; 5</span>
</li>
<li class="hbox">
- <a href="#6">Script loading: Web Workers</a><span class="spacer boxFlex"></span><span>&sect; 6</span>
+ <a href="#6">Script loading: Web Workers</a><span class="spacer boxFlex"></span><span class="sect">&sect; 6</span>
</li>
<li class="hbox">
- <a href="#7">Script loading: document.write()</a><span class="spacer boxFlex"></span><span>&sect; 7</span>
+ <a href="#7">Script loading: document.write()</a><span class="spacer boxFlex"></span><span class="sect">&sect; 7</span>
</li>
<li class="hbox">
- <a href="#8">Script loading: head.appendchild(script)</a><span class="spacer boxFlex"></span><span>&sect; 8</span>
+ <a href="#8">Script loading: head.appendchild(script)</a><span class="spacer boxFlex"></span><span class="sect">&sect; 8</span>
</li>
<li class="hbox">
- <a href="#9">Function wrapping</a><span class="spacer boxFlex"></span><span>&sect; 9</span>
+ <a href="#9">Function wrapping</a><span class="spacer boxFlex"></span><span class="sect">&sect; 9</span>
</li>
</ul>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.