Skip to content
Myr

Added contrib docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 893aa80 · Browse files · 12 files+403 added−16 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

12 files+403 added−16 removed

  • other:+403 added−16 removed

12 files+403 added−16 removed

modified:docs/layout/head.html+2 added-1 removed
modified:docs/api.html+13 added-11 removed
473 unmodified lines
474<li><p><strong>param</strong>: <em>String</em> name</p></li>475<li><p><strong>return</strong>: <em>String</em></p></li>476<li><p><strong>api</strong>: <em>public</em></p></li>477</ul>478478���:479</td>480<td class="code">481<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">param</span> = <span class="keyword">function</span>(<span class="variable">name</span>){482 <span class="comment">// Route params like /user/:id</span>
138 unmodified lines
621</td>622</tr>623<tr class="code">624<td class="docs">625<p>Inherit from <code>connect.Server</code>.</p> 625<p>Inherit from <code>connect.Server</code>.</p>626</td>627<td class="code">628<pre><code><span class="variable">sys</span>.<span class="variable">inherits</span>(<span class="class">Server</span>, <span class="variable">connect</span>.<span class="class">Server</span>);</code></pre>629</td>
112 unmodified lines
742<li><p><strong>param</strong>: <em>String</em> setting</p></li>743<li><p><strong>return</strong>: <em>Server</em> for chaining</p></li>744<li><p><strong>api</strong>: <em>public</em></p></li>745</ul>746VQ746747</td>748<td class="code">749<pre><code><span class="class">Server</span>.<span class="variable">prototype</span>.<span class="variable">enable</span> = <span class="keyword">function</span>(<span class="variable">setting</span>){750 <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">set</span>(<span class="variable">setting</span>, <span class="variable">true</span>);
10 unmodified lines
761<li><p><strong>param</strong>: <em>String</em> setting</p></li>762<li><p><strong>return</strong>: <em>Server</em> for chaining</p></li>763<li><p><strong>api</strong>: <em>public</em></p></li>764</ul>765P765766</td>767<td class="code">768<pre><code><span class="class">Server</span>.<span class="variable">prototype</span>.<span class="variable">disable</span> = <span class="keyword">function</span>(<span class="variable">setting</span>){769 <span class="keyword">return</span> <span class="this">this</span>.<span class="variable">set</span>(<span class="variable">setting</span>, <span class="variable">false</span>);
10 unmodified lines
780<li><p><strong>param</strong>: <em>String</em> setting</p></li>781<li><p><strong>return</strong>: <em>Server</em> for chaining</p></li>782<li><p><strong>api</strong>: <em>public</em></p></li>783</ul>784P784785</td>786<td class="code">787<pre><code><span class="class">Server</span>.<span class="variable">prototype</span>.<span class="variable">configure</span> = <span class="keyword">function</span>(<span class="variable">env</span>, <span class="variable">fn</span>){788 <span class="keyword">if</span> (<span class="keyword">typeof</span> <span class="variable">env</span> === <span class="string">'function'</span>) <span class="variable">fn</span> = <span class="variable">env</span>, <span class="variable">env</span> = <span class="string">'any'</span>;
28 unmodified lines
817<li><p><strong>param</strong>: <em>String</em> str</p></li>818<li><p><strong>return</strong>: <em>String</em></p></li>819<li><p><strong>api</strong>: <em>public</em></p></li>820</ul>821 821822</td>823<td class="code">824<pre><code><span class="variable">exports</span>.<span class="variable">miniMarkdown</span> = <span class="keyword">function</span>(<span class="variable">str</span>){825 <span class="keyword">return</span> <span class="class">String</span>(<span class="variable">str</span>)
59 unmodified lines
885886<ul>887<li><strong>type</strong>: <em>Object</em></li>888</ul>889889890</td>891<td class="code">892<pre><code><span class="keyword">var</span> <span class="variable">viewCache</span> = {};</code></pre>893</td>
4 unmodified lines
898899<ul>900<li><strong>api</strong>: <em>public</em></li>901</ul>902 902903</td>904<td class="code">905<pre><code><span class="variable">exports</span>.<span class="variable">clearCache</span> = <span class="keyword">function</span>(){906 <span class="variable">viewCache</span> = {};
6 unmodified lines
913914<ul>915<li><strong>type</strong>: <em>Object</em></li>916</ul>917 917918</td>919<td class="code">920<pre><code><span class="keyword">var</span> <span class="variable">helpers</span> = <span class="variable">exports</span>.<span class="variable">helpers</span> = {};</code></pre>921</td>
25 unmodified lines
947<li><p><strong>param</strong>: <em>Object | Array</em> options or collection</p></li>948<li><p><strong>return</strong>: <em>String</em></p></li>949<li><p><strong>api</strong>: <em>public</em></p></li>950</ul>951VQ951952</td>953<td class="code">954<pre><code><span class="variable">http</span>.<span class="class">ServerResponse</span>.<span class="variable">prototype</span>.<span class="variable">partial</span> = <span class="keyword">function</span>(<span class="variable">view</span>, <span class="variable">options</span>, <span class="variable">ext</span>){955 <span class="keyword">if</span> (<span class="variable">ext</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">view</span>.<span class="variable">indexOf</span>(<span class="string">'.'</span>) &<span class="variable">lt</span>; <span class="number integer">0</span>) {
57 unmodified lines
1013<li><p><strong>param</strong>: <em>Object</em> options</p></li>1014<li><p><strong>param</strong>: <em>Function</em> fn</p></li>1015<li><p><strong>api</strong>: <em>public</em></p></li>1016</ul>1017�1017: <em>public</em></p></li>1018</ul>1019���:1020</td>1021<td class="code">1022<pre><code><span class="variable">http</span>.<span class="class">ServerResponse</span>.<span class="variable">prototype</span>.<span class="variable">render</span> = <span class="keyword">function</span>(<span class="variable">view</span>, <span class="variable">options</span>, <span class="variable">fn</span>){1023 <span class="variable">options</span> = <span class="variable">options</span> || {};
93 unmodified lines
added:docs/contrib.1+96 added
1.\" generated with Ronn/v0.6.62.\" http://github.com/rtomayko/ronn/3.4.TH "CONTRIB" "" "July 2010" "" ""5.6.SS "Development Dependencies"7Express development dependencies are stored within the \fI\./support\fR directory\. To update them execute:8.9.IP "" 410.11.nf1213$ git submodule update \-\-init14.15.fi16.17.IP "" 018.19.SS "Running Tests"20Express uses the Expresso \fIhttp://github\.com/visionmedia/expresso\fR TDD framework to write and run elegant test suites extremely fast\. To run all test suites simply execute:21.22.IP "" 423.24.nf2526$ make test27.28.fi29.30.IP "" 031.32.P33To target specific suites we may specify the files via:34.35.IP "" 436.37.nf3839$ make test TESTS=test/view\.test\.js40.41.fi42.43.IP "" 044.45.SS "Contributions"46To accept a contribution, you should follow these guidelines:47.48.IP "\(bu" 449All tests \fImust\fR pass50.51.IP "\(bu" 452Your alterations or additions \fImust\fR include tests53.54.IP "\(bu" 455Your commit(s) should be \fIfocused\fR, do not commit once for several changes56.57.IP "\(bu" 458Do \fInot\fR alter release information such as the \fIversion\fR, or \fIHistory\.md\fR59.60.IP "\(bu" 461Indents are \fI4\fR spaces\.62.63.IP "" 064.65.SS "Style Guide"66good:67.68.IP "" 469.70.nf7172if (foo) {73 bar();74 baz();75}76.77.fi78.79.IP "" 080.81.P82bad:83.84.IP "" 485.86.nf8788if(foo) {89 bar()90 baz()91}92.93.fi94.95.IP "" 096
added:docs/contrib.html+220 added
1<html>2 <head>3 <title>Express - node web framework</title>4 <style>5 #header {6 position: absolute;7 top: 10px;8 left: 0;9 padding: 12px 0;10 text-indent: 40px;11 width: 100%;12 border-top: 1px solid rgba(0,0,0,0.7);13 border-bottom: 1px solid rgba(0,0,0,0.7);14 background: rgba(255,255,255,0.1) url(http://www.sencha.com/favicon.ico) no-repeat 15px 50%;15 text-align: left;16 color: #fff;17 }18 #tagline {19 margin-left: 75px;20 margin-bottom: 30px;21 color: rgba(255,255,255,0.7); }22 html {23 background: #1c1c1c url(images/bg.tile.jpg); }2425 body {26 margin: 0;27 padding-bottom: 30px;28 font: 14px/1.4 "Helvetica Neue", "Lucida Grande", "Arial";29 font-size: 14px;30 line-height: 1.5;31 -webkit-text-stroke: 1px rgba(0, 0, 0, 0.1);32 -moz-text-stroke: 1px rgba(0, 0, 0, 0.1);33 background: url(images/bg.jpg) 50% 0 no-repeat;34 color: #8b8b8b; }3536 * {37 outline: none; }3839 em {40 color: white; }4142 a img {43 border: none !important; }4445 a {46 font-weight: bold;47 color: white;48 -webkit-transition-property: opacity, -webkit-transform, color, background-color, padding, -webkit-box-shadow;49 -webkit-transition-duration: 0.15s;50 -webkit-transition-timing-function: ease-out; }51 a:hover {52 opacity: 0.8; }5354 h1, h2, h3 {55 margin: 45px 0 0 0;56 color: white;57 text-shadow: 1px 2px 2px rgba(0,0,0,0.6); }5859 h3 {60 font-size: 18px; }6162 pre {63 margin: 20px 10px;64 padding: 25px 20px;65 background: rgba(0,0,0,0.5);66 border: 1px solid #323232;67 -webkit-box-shadow: 1px 2px 2px rgba(0,0,0,0.6);68 -moz-box-shadow: 1px 2px 2px rgba(0,0,0,0.6);69 -webkit-border-radius: 5px;70 -moz-border-radius: 5px; }7172 code {73 font-family: "Helvetica Neue", "Lucida Grande", "Arial"; }7475 ul {76 margin: 15px 0;77 padding: 0 0 0 35px; }78 ul li {79 margin: 0;80 padding: 2px 0;81 list-style: square; }8283 .sect {84 margin-left: 40px; }8586 #logo {87 display: block;88 margin-left: 30%;89 margin-bottom: 30px;90 width: 194px;91 height: 51px;92 background: url(images/logo.png) 0 0 no-repeat;93 text-indent: -99999px; }94 #logo:hover {95 opacity: 0.7; }96 #logo:active {97 opacity: 0.3; }9899 #ribbon {100 position: fixed;101 top: 0;102 right: 0;103 z-index: 2; }104105 #wrapper {106 width: 100%;107 min-height: 800px;108 background: url(images/top.png) 0 0 repeat-x; }109110 #container {111 margin: 0 auto;112 padding-top: 110px;113 width: 550px; }114115 #menu {116 margin-left: 65px;117 padding: 0;118 padding-bottom: 30px; }119 #menu li {120 display: inline;121 list-style: none; }122 #menu li a {123 display: block;124 float: left;125 margin: 0 2px;126 padding: 3px 15px;127 background: rgba(0,0,0,0.2);128 -webkit-border-radius: 8px;129 -moz-border-radius: 8px;130 -webkit-box-shadow: 1px 2px 2px rgba(0,0,0,0.6);131 -moz-box-shadow: 1px 2px 2px rgba(0,0,0,0.6);132 -webkit-transition-property: opacity, -webkit-transform, color, background-color, -webkit-box-shadow;133 -webkit-transition-duration: 0.15s;134 -webkit-transition-timing-function: ease-out; }135 #menu li a:hover,136 #menu li a.active {137 background: rgba(0,0,0,0.5); }138 #menu li a:active {139 background: rgba(0,0,0,0.1);140 -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,0.4);141 -moz-box-shadow: 1px 1px 1px rgba(0,0,0,0.4); }142 </style>143 </head>144 <body>145 <a href='http://github.com/visionmedia/express'> 146 <img alt='Fork me on GitHub' id='ribbon' src='http://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png' /> 147 </a>148 <div id="header"><strong>Sencha</strong> labs</div>149 <div id="wrapper">150 <div id="container">151 <a href='http://github.com/visionmedia/express' id='logo'>Express</a> 152 <p id="tagline">153 High performance, high class web development for154 <a href="http://nodejs.org">Node.js</a>155 </p>156 <ul id="menu">157 <li><a href="index.html">Home</a></li>158 <li><a href="guide.html">Guide</a></li>159 <li><a href="contrib.html">Contributing</a></li>160 <li><a href="migrate.html">1.x Migration</a></li>161 </ul>162<div class='mp'>163<h3 id="Development-Dependencies">Development Dependencies</h3>164165<p>Express development dependencies are stored within the <em>./support</em> directory. To166update them execute:</p>167168<pre><code>$ git submodule update --init169</code></pre>170171<h3 id="Running-Tests">Running Tests</h3>172173<p>Express uses the <a href="http://github.com/visionmedia/expresso">Expresso</a> TDD174framework to write and run elegant test suites extremely fast. To run all test suites175simply execute:</p>176177<pre><code>$ make test178</code></pre>179180<p>To target specific suites we may specify the files via:</p>181182<pre><code>$ make test TESTS=test/view.test.js183</code></pre>184185<h3 id="Contributions">Contributions</h3>186187<p>To accept a contribution, you should follow these guidelines:</p>188189<ul>190<li>All tests <em>must</em> pass</li>191<li>Your alterations or additions <em>must</em> include tests</li>192<li>Your commit(s) should be <em>focused</em>, do not commit once for several changes</li>193<li>Do <em>not</em> alter release information such as the <em>version</em>, or <em>History.md</em></li>194<li>Indents are <em>4</em> spaces.</li>195</ul>196197198<h3 id="Style-Guide">Style Guide</h3>199200<p>good:</p>201202<pre><code>if (foo) {203 bar();204 baz();205}206</code></pre>207208<p>bad:</p>209210<pre><code>if(foo) {211 bar()212 baz()213}214</code></pre>215216</div>217 </div>218 </div>219 </body>220</html>
added:docs/contrib.md+29 added
modified:docs/executable.html+2 added-1 removed
111 unmodified lines
112 padding-top: 110px;113 width: 550px; }114115 #menu {116 margin-left: 130px;116 margin-left: 65px;117 padding: 0;118 padding-bottom: 30px; }119 #menu li {120 display: inline;
34 unmodified lines
155 </p>156 <ul id="menu">157 <li><a href="index.html">Home</a></li>158 <li><a href="guide.html">Guide</a></li>159 <li><a href="contrib.html">Contributing</a></li>160 <li><a href="migrate.html">1.x Migration</a></li>161 </ul>162<div class='mp'>163<h2 id="Synopsis">Synopsis</h2>
21 unmodified lines
modified:docs/guide.html+2 added-1 removed
111 unmodified lines
112 padding-top: 110px;113 width: 550px; }114115 #menu {116 margin-left: 130px;116 margin-left: 65px;117 padding: 0;118 padding-bottom: 30px; }119 #menu li {120 display: inline;
34 unmodified lines
155 </p>156 <ul id="menu">157 <li><a href="index.html">Home</a></li>158 <li><a href="guide.html">Guide</a></li>159 <li><a href="contrib.html">Contributing</a></li>160 <li><a href="migrate.html">1.x Migration</a></li>161 </ul>162<div class='mp'>163<h3 id="Creating-An-Application">Creating An Application</h3>
158 unmodified lines
modified:docs/index.html+2 added-1 removed
111 unmodified lines
112 padding-top: 110px;113 width: 550px; }114115 #menu {116 margin-left: 130px;116 margin-left: 65px;117 padding: 0;118 padding-bottom: 30px; }119 #menu li {120 display: inline;
34 unmodified lines
155 </p>156 <ul id="menu">157 <li><a href="index.html">Home</a></li>158 <li><a href="guide.html">Guide</a></li>159 <li><a href="contrib.html">Contributing</a></li>160 <li><a href="migrate.html">1.x Migration</a></li>161 </ul>162<div class='mp'>163<pre><code>var app = express.createServer();
45 unmodified lines
modified:docs/migrate.1+16 added
325 unmodified lines
326.327.fi328.329.IP "" 0330.331.SS "HTTP Client"332Previously Express provided a high level http client, this library is no more as it does not belong in Express, however it may be resurrected as a separate module\.333.334.SS "Core Extensions"335Express is no longer dependent on the JavaScript Extensions \fIhttp://github\.com/visionmedia/ext\.js\fR library, so those of you using the methods provided by it such as \fBObject\.merge(a, b)\fR will need to roll your own, or install the module via:336.337.IP "" 4338.339.nf340341$ npm install ext342.343.fi344.345.IP "" 0346
modified:docs/migrate.html+15 added-1 removed
111 unmodified lines
112 padding-top: 110px;113 width: 550px; }114115 #menu {116 margin-left: 130px;116 margin-left: 65px;117 padding: 0;118 padding-bottom: 30px; }119 #menu li {120 display: inline;
34 unmodified lines
155 </p>156 <ul id="menu">157 <li><a href="index.html">Home</a></li>158 <li><a href="guide.html">Guide</a></li>159 <li><a href="contrib.html">Contributing</a></li>160 <li><a href="migrate.html">1.x Migration</a></li>161 </ul>162<div class='mp'>163<h3 id="Built-On-Connect">Built On Connect</h3>
194 unmodified lines
358359<pre><code>res.redirect('/somewhere');360</code></pre>361362<h3 id="HTTP-Client">HTTP Client</h3>363364<p>Previously Express provided a high level http client, this library is no more365as it does not belong in Express, however it may be resurrected as a separate module.</p>366367<h3 id="Core-Extensions">Core Extensions</h3>368369<p>Express is no longer dependent on the <a href="http://github.com/visionmedia/ext.js">JavaScript Extensions</a> library, so those of you using the methods provided by it such as <code>Object.merge(a, b)</code> will need to370roll your own, or install the module via:</p>371372<pre><code>$ npm install ext373</code></pre>374375</div>376 </div>377 </div>378 </body>
1 unmodified line
modified:.pomo+5 added
37 unmodified lines
38 complete: false39 description: 40 length: 2541 name: contributing section42- !ruby/object:Pomo::Task 43 complete: false44 description: 45 length: 2546 name: custom 404 / 500 etc
modified:Makefile+1 added
2 unmodified lines
3LIB_PREFIX = ~/.node_libraries45DOCS = docs/index.md \6 docs/executable.md \7 docs/contrib.md \8 docs/guide.md \9 docs/migrate.md1011MANPAGES =$(DOCS:.md=.1)
59 unmodified lines