A short bit about what this guide is and why its important
Should explain the goal of the document, and generally these should be included
- details
- cross-references
var portrange = 45032 | |
function getPort (cb) { | |
var port = portrange | |
portrange += 1 | |
var server = net.createServer() | |
server.listen(port, function (err) { | |
server.once('close', function () { | |
cb(port) |
At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)
Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.
Then /^I should see the API documentation$/ do | |
uri = URI.parse('http://api.spire.io') | |
request = Net::HTTP::Get.new(uri.request_uri) | |
request['Accept'] = 'text/html' | |
response = Net::HTTP.start(uri.host, uri.port) {|http| | |
http.request(request) | |
} | |
page.should have_css('.api-reference') |
{ scopeName = 'text.html.basic'; | |
firstLineMatch = '<!DOCTYPE|<(?i:html)|<\?(?i:php)'; | |
fileTypes = ( 'html', 'htm', 'shtml', 'xhtml', 'phtml', 'php', 'inc', 'tmpl', 'tpl', 'ctp' ); | |
foldingStartMarker = '(?x) | |
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)\b.*?> | |
|<!--(?!.*--\s*>) | |
|^<!--\ \#tminclude\ (?>.*?-->)$ | |
|<\?(?:php)?.*\b(if|for(each)?|while)\b.+: | |
|\{\{?(if|foreach|capture|literal|foreach|php|section|strip) | |
|\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/))) |
http = require('http'); | |
var options = { | |
host: 'localhost', | |
port: '1337', | |
path: '/', | |
// NOTE: Headers can't be set until after the xhr is opened | |
// https://github.com/substack/http-browserify | |
// headers: { | |
// 'Accept': 'application/json' |
var vows = require('vows') | |
, assert = require('assert') | |
; | |
vows.describe('Whatever').addBatch({ | |
'top level context': { | |
topic: function(){ | |
var foo = 'bar'; | |
return foo; |
// less.js, modernizer, and almost all dymanic content seems broken :( | |
var zombie = require("zombie") | |
, assert = require("assert") | |
; | |
var jxson = new zombie.Browser(); | |
var darthburrit0 = new zombie.Browser(); | |
var url = 'http://localhost:8080/simple-chat/index.html'; | |
// var url = 'http://localhost:8080/stylesheets/master.less'; |
node_modules |
<script id="message" type="text/html"> | |
<div class="message {{ type }}" id="{{ cssID }}"> | |
<time datetime="{{ time }}">{{ humanTime }}</time> | |
<span class="name {{#isYou}} current-user {{/isYou}}"> | |
{{ author }}: | |
</span> | |
<span class="body">{{ content }}</span> |