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
Provenance
- Commit
f0ba57b- Tree
cec0607- Author
Tj Holowaychuk <tj@vision-media.ca>- Committer
Tj Holowaychuk <tj@vision-media.ca>- Parent
893aa80
12 files changed+403 added−16 removed
modified:docs/layout/head.html+2 added-1 removed
111 unmodified linesExpand all11211311411511611611711811912034 unmodified lines155156157158159160161111 unmodified linesExpand all padding-top: 110px; width: 550px; }
#menu { margin-left: 130px; margin-left: 65px; padding: 0; padding-bottom: 30px; } #menu li { display: inline;34 unmodified lines </p> <ul id="menu"> <li><a href="index.html">Home</a></li> <li><a href="guide.html">Guide</a></li> <li><a href="contrib.html">Contributing</a></li> <li><a href="migrate.html">1.x Migration</a></li> </ul>modified:docs/api.html+13 added-11 removed
473 unmodified lines474 <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>478-478+���: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 lines621 </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 lines742 <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>746-VQ746+747 </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 lines761 <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>765-P765+766 </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 lines780 <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>784-P784+785 </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 lines817 <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- 821+822 </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 lines885 886 <ul>887 <li><strong>type</strong>: <em>Object</em></li>888 </ul>889-889+890 </td>891 <td class="code">892 <pre><code><span class="keyword">var</span> <span class="variable">viewCache</span> = {};</code></pre>893 </td>4 unmodified lines898 899 <ul>900 <li><strong>api</strong>: <em>public</em></li>901 </ul>902- 902+903 </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 lines913 914 <ul>915 <li><strong>type</strong>: <em>Object</em></li>916 </ul>917- 917+918 </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 lines947 <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>951-VQ951+952 </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 lines1013 <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 linesadded: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"7+Express development dependencies are stored within the \fI\./support\fR directory\. To update them execute:8+.9+.IP "" 410+.11+.nf12+13+$ git submodule update \-\-init14+.15+.fi16+.17+.IP "" 018+.19+.SS "Running Tests"20+Express 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+.nf25+26+$ make test27+.28+.fi29+.30+.IP "" 031+.32+.P33+To target specific suites we may specify the files via:34+.35+.IP "" 436+.37+.nf38+39+$ make test TESTS=test/view\.test\.js40+.41+.fi42+.43+.IP "" 044+.45+.SS "Contributions"46+To accept a contribution, you should follow these guidelines:47+.48+.IP "\(bu" 449+All tests \fImust\fR pass50+.51+.IP "\(bu" 452+Your alterations or additions \fImust\fR include tests53+.54+.IP "\(bu" 455+Your commit(s) should be \fIfocused\fR, do not commit once for several changes56+.57+.IP "\(bu" 458+Do \fInot\fR alter release information such as the \fIversion\fR, or \fIHistory\.md\fR59+.60+.IP "\(bu" 461+Indents are \fI4\fR spaces\.62+.63+.IP "" 064+.65+.SS "Style Guide"66+good:67+.68+.IP "" 469+.70+.nf71+72+if (foo) {73+ bar();74+ baz();75+}76+.77+.fi78+.79+.IP "" 080+.81+.P82+bad:83+.84+.IP "" 485+.86+.nf87+88+if(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); }24+25+ 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; }35+36+ * {37+ outline: none; }38+39+ em {40+ color: white; }41+42+ a img {43+ border: none !important; }44+45+ 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; }53+54+ h1, h2, h3 {55+ margin: 45px 0 0 0;56+ color: white;57+ text-shadow: 1px 2px 2px rgba(0,0,0,0.6); }58+59+ h3 {60+ font-size: 18px; }61+62+ 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; }71+72+ code {73+ font-family: "Helvetica Neue", "Lucida Grande", "Arial"; }74+75+ 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; }82+83+ .sect {84+ margin-left: 40px; }85+86+ #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; }98+99+ #ribbon {100+ position: fixed;101+ top: 0;102+ right: 0;103+ z-index: 2; }104+105+ #wrapper {106+ width: 100%;107+ min-height: 800px;108+ background: url(images/top.png) 0 0 repeat-x; }109+110+ #container {111+ margin: 0 auto;112+ padding-top: 110px;113+ width: 550px; }114+115+ #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>164+165+<p>Express development dependencies are stored within the <em>./support</em> directory. To166+update them execute:</p>167+168+<pre><code>$ git submodule update --init169+</code></pre>170+171+<h3 id="Running-Tests">Running Tests</h3>172+173+<p>Express uses the <a href="http://github.com/visionmedia/expresso">Expresso</a> TDD174+framework to write and run elegant test suites extremely fast. To run all test suites175+simply execute:</p>176+177+<pre><code>$ make test178+</code></pre>179+180+<p>To target specific suites we may specify the files via:</p>181+182+<pre><code>$ make test TESTS=test/view.test.js183+</code></pre>184+185+<h3 id="Contributions">Contributions</h3>186+187+<p>To accept a contribution, you should follow these guidelines:</p>188+189+<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>196+197+198+<h3 id="Style-Guide">Style Guide</h3>199+200+<p>good:</p>201+202+<pre><code>if (foo) {203+ bar();204+ baz();205+}206+</code></pre>207+208+<p>bad:</p>209+210+<pre><code>if(foo) {211+ bar()212+ baz()213+}214+</code></pre>215+216+</div>217+ </div>218+ </div>219+ </body>220+</html>added:docs/contrib.md+29 added
1234567891011121314151617181920212223242526272829
### Development Dependencies
Express development dependencies are stored within the _./support_ directory. Toupdate them execute:
$ git submodule update --init
### Running Tests
Express uses the [Expresso](http://github.com/visionmedia/expresso) TDDframework to write and run elegant test suites extremely fast. To run all test suitessimply execute:
$ make test
To target specific suites we may specify the files via:
$ make test TESTS=test/view.test.js
### Contributions
To accept a contribution, you should follow these guidelines:
* All tests _must_ pass * Your alterations or additions _must_ include tests * Your commit(s) should be _focused_, do not commit once for several changes * Do _not_ alter release information such as the _version_, or _History.md_ * Indents are _4_ spaces.modified:docs/executable.html+2 added-1 removed
111 unmodified lines112 padding-top: 110px;113 width: 550px; }114 115 #menu {116- margin-left: 130px;116+ margin-left: 65px;117 padding: 0;118 padding-bottom: 30px; }119 #menu li {120 display: inline;34 unmodified lines155 </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 linesmodified:docs/guide.html+2 added-1 removed
111 unmodified lines112 padding-top: 110px;113 width: 550px; }114 115 #menu {116- margin-left: 130px;116+ margin-left: 65px;117 padding: 0;118 padding-bottom: 30px; }119 #menu li {120 display: inline;34 unmodified lines155 </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 linesmodified:docs/index.html+2 added-1 removed
111 unmodified lines112 padding-top: 110px;113 width: 550px; }114 115 #menu {116- margin-left: 130px;116+ margin-left: 65px;117 padding: 0;118 padding-bottom: 30px; }119 #menu li {120 display: inline;34 unmodified lines155 </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 linesmodified:docs/migrate.1+16 added
325 unmodified lines326 .327 .fi328 .329 .IP "" 0330+.331+.SS "HTTP Client"332+Previously 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"335+Express 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+.nf340 341+$ npm install ext342+.343+.fi344+.345+.IP "" 0346+modified:docs/migrate.html+15 added-1 removed
111 unmodified lines112 padding-top: 110px;113 width: 550px; }114 115 #menu {116- margin-left: 130px;116+ margin-left: 65px;117 padding: 0;118 padding-bottom: 30px; }119 #menu li {120 display: inline;34 unmodified lines155 </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 lines358 359 <pre><code>res.redirect('/somewhere');360 </code></pre>361 362+<h3 id="HTTP-Client">HTTP Client</h3>363+364+<p>Previously Express provided a high level http client, this library is no more365+as it does not belong in Express, however it may be resurrected as a separate module.</p>366+367+<h3 id="Core-Extensions">Core Extensions</h3>368+369+<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 to370+roll your own, or install the module via:</p>371+372+<pre><code>$ npm install ext373+</code></pre>374+375 </div>376 </div>377 </div>378 </body>1 unmodified linemodified:.pomo+5 added
37 unmodified lines38 complete: false39 description: 40 length: 2541 name: contributing section42+- !ruby/object:Pomo::Task 43+ complete: false44+ description: 45+ length: 2546+ name: custom 404 / 500 etcmodified:Makefile+1 added
2 unmodified lines3 LIB_PREFIX = ~/.node_libraries4 5 DOCS = docs/index.md \6 docs/executable.md \7+ docs/contrib.md \8 docs/guide.md \9 docs/migrate.md10 11 MANPAGES =$(DOCS:.md=.1)59 unmodified lines