Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

docs

  • Loading branch information...
commit 0b1584b0761b1e7251cd200fdf7caf7d4f43ad31 1 parent 3e57cf2
@aheckmann aheckmann authored
View
1  .gitignore
@@ -9,3 +9,4 @@ benchmarks/benchmarks3
benchmarks/v8.log
.DS_Store
docs/*.json
+docs/source/_docs
View
2  Makefile
@@ -22,6 +22,6 @@ site:
docclean:
rm -f ./docs/*.{1,html,json}
- rm -f ./docs/_docs
+ rm -f ./docs/source/_docs
.PHONY: test home site test-old docs docclean
View
4,728 docs/api.html
2,160 additions, 2,568 deletions not shown
View
12 docs/api.jade
@@ -64,12 +64,12 @@ html(lang='en')
text-decoration: none;
}
#header .mongoose {
- font-size: 146px;
+ font-size: 60px;
font-weight: 100;
text-indent: -23px;
color: #fff;
text-shadow: 18px 5px 6px #777, -6px 0px 2px #fff;
- letter-spacing: -14px;
+ letter-spacing: -7px;
}
body.api
a(href="http://github.com/learnboost/mongoose")
@@ -79,7 +79,6 @@ html(lang='en')
h1
a(href="https://github.com/learnboost/mongoose", target="blank")
.mongoose Mongoose
- .odm ODM
#links
ul
each item in docs
@@ -87,10 +86,11 @@ html(lang='en')
a(href="/docs/index.html")= item.title
each method in item.json
if !method.ignore && !method.isPrivate
+ if method.ctx
+ h3= method.ctx.name
!= method.description.full
- if !method.ignore && !method.isPrivate
- :js
- #{method.code}
+ - code = method.code;
+ != hl(code)
script.
document.body.className = 'load';
View
3  docs/filters.js
@@ -5,7 +5,8 @@ module.exports = exports = function (jade) {
// add highlighting filter to jade
jade.filters.js = function (str) {
- var ret = hl.highlight('javascript', str.replace(/\\n/g, '\n')).value;
+ str = str.replace(/\\n/g, '\n');
+ var ret = hl.highlight('javascript', str).value;
var code = '<pre><code class="javascript">' + ret.replace(/\n/g, '\\n') + '</code></pre>';
return code;
}
View
11 docs/highlight.js
@@ -0,0 +1,11 @@
+
+var h = require('highlight.js')
+
+function hl (str) {
+ str = str.replace(/\\n/g, '\n');
+ var ret = h.highlight('javascript', str).value;
+ var code = '<pre><code class="javascript">' + ret+ '</code></pre>';
+ return code;
+}
+
+module.exports = hl;
View
12,334 docs/source/_docs
0 additions, 12,334 deletions not shown
View
2  lib/collection.js
@@ -183,7 +183,7 @@ Collection.prototype.mapReduce = function(){
throw new Error('Collection#mapReduce unimplemented by driver');
};
-/**
+/*!
* Module exports.
*/
View
7 lib/connection.js
@@ -12,10 +12,10 @@ var url = require('url')
, STATES = require('./connectionstate')
, assert =require('assert')
-/**
+/*!
* Protocol prefix regexp.
*
- * @ignore
+ * @api private
*/
var rgxProtocol = /^(?:.)+:\/\//;
@@ -563,9 +563,8 @@ Connection.prototype.defaultOptions = function (options) {
return o;
}
-/**
+/*!
* Noop.
- * @ignore
*/
function noop () {}
View
3  lib/document.js
@@ -284,9 +284,8 @@ Document.prototype._storeShard = function _storeShard () {
}
}
-/**
+/*!
* Set up middleware support
- * @ignore
*/
for (var k in hooks) {
View
3  lib/index.js
@@ -51,9 +51,8 @@ Mongoose.prototype.get = function (key, value) {
return this;
};
-/**
+/*!
* ReplSet connection string check.
- * @ignore
*/
var rgxReplSet = /^.+,.+$/;
View
6 lib/model.js
@@ -361,7 +361,7 @@ Model.prototype.save = function save (fn) {
}
};
-/**
+/*!
* operand
*
* Apply the operation to the delta (update) clause as
@@ -373,7 +373,6 @@ Model.prototype.save = function save (fn) {
* @param {Object} data
* @param {Mixed} val
* @param {String} [operation]
- * @ignore
*/
function operand (self, where, delta, data, val, op) {
@@ -426,7 +425,7 @@ function operand (self, where, delta, data, val, op) {
}
}
-/**
+/*!
* handleMongooseArray
*
* Compiles an update and where clause for an array.
@@ -436,7 +435,6 @@ function operand (self, where, delta, data, val, op) {
* @param {Object} delta
* @param {Object} data
* @param {Array} arr
- * @ignore
*/
function handleMongooseArray (self, where, delta, data, arr) {
View
2  lib/query.js
@@ -769,7 +769,7 @@ Query.prototype.sort = function (arg) {
return this;
};
-/**
+/*!
* @ignore
*/
View
2  lib/schema/array.js
@@ -157,7 +157,7 @@ SchemaArray.prototype.castForQuery = function ($conditional, value) {
: val;
};
-/**
+/*!
* @ignore
*/
View
4 website.js
@@ -2,6 +2,7 @@
var fs= require('fs')
var jade = require('jade')
var package = require('./package')
+var hl = require('./docs/highlight')
// add custom jade filters
require('./docs/filters')(jade);
@@ -25,13 +26,14 @@ files.forEach(function (file) {
function jadeify (filename, options) {
options || (options = {});
options.package = package;
+ options.hl = hl;
jade.renderFile(filename, options, function (err, str) {
if (err) return console.error(err.stack);
var newfile = filename.replace('.jade', '.html')
fs.writeFile(newfile, str, function (err) {
if (err) return console.error('could not write', err.stack);
- console.error('%s : rendered ', new Date, newfile);
+ console.log('%s : rendered ', new Date, newfile);
});
});
}
Please sign in to comment.
Something went wrong with that request. Please try again.