Skip to content

Commit

Permalink
Ensure that documentation is generated correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Aug 30, 2015
1 parent d339af9 commit d92fce4
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 20 deletions.
2 changes: 1 addition & 1 deletion build/doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gulp.task('doc', function() {
return gulp.src(paths.docSourceFiles).pipe(typedoc({
module: 'commonjs',
target: 'es5',
mode: 'modules',
mode: 'file',
entryPoint: 'iridium',

out: './doc',
Expand Down
25 changes: 20 additions & 5 deletions build/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,25 @@ module.exports = {
testSupportFiles: ['dist/test/support/chai'],

docSourceFiles: [
"index.ts"
// "lib/Core.ts",
// "lib/Model.ts",
// "lib/Instance.ts",
// "lib/Instance.ts"
"lib/Core.ts",
"lib/Model.ts",
"lib/Instance.ts",

"lib/Decorators.ts",

"lib/Plugins.ts",
"lib/Schema.ts",
"lib/Cache.ts",
"lib/CacheDirector.ts",
"lib/ModelOptions.ts",
"lib/Configuration.ts",
"lib/Hooks.ts",

"lib/caches/MemoryCache.ts",
"lib/caches/NoOpCache.ts",

"lib/cacheControllers/IDDirector.ts",

"lib/utils/ObjectID.ts"
]
};
6 changes: 3 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export * from './lib/ModelOptions';
export * from './lib/Configuration';
export * from './lib/Hooks';

import MemoryCache from './lib/caches/MemoryCache';
import NoOpCache from './lib/caches/NoOpCache';
import {MemoryCache} from './lib/caches/MemoryCache';
import {NoOpCache} from './lib/caches/NoOpCache';
export {MemoryCache, NoOpCache};

import IDDirector from './lib/cacheControllers/IDDirector';
import {IDDirector} from './lib/cacheControllers/IDDirector';
export {IDDirector as CacheOnID};

import {toObjectID} from './lib/utils/ObjectID';
Expand Down
6 changes: 3 additions & 3 deletions lib/Core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import {Instance} from './Instance';

import {MiddlewareFactory} from './Middleware';
import * as ExpressMiddleware from './middleware/Express';
import ExpressMiddlewareFactory from './middleware/Express';
import {ExpressMiddlewareFactory} from './middleware/Express';

import {Cache} from './Cache';
import NoOpCache from './caches/NoOpCache';
import MemoryCache from './caches/MemoryCache';
import {NoOpCache} from './caches/NoOpCache';
import {MemoryCache} from './caches/MemoryCache';

export class Core {
/**
Expand Down
4 changes: 0 additions & 4 deletions lib/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ import Cursor from './Cursor';
import * as Index from './Index';
import * as ModelOptions from './ModelOptions';

import noOpCache from './caches/NoOpCache';
import memoryCache from './caches/MemoryCache';
import idCacheController from './cacheControllers/IDDirector';

import Omnom from './utils/Omnom';
import {ModelCache} from './ModelCache';
import {ModelHelpers} from './ModelHelpers';
Expand Down
2 changes: 1 addition & 1 deletion lib/cacheControllers/IDDirector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import {CacheDirector} from '../CacheDirector';
import MongoDB = require('mongodb');

export default class IDCacheDirector implements CacheDirector{
export class CacheOnID implements CacheDirector{
valid(object: { _id: any }) {
return !!object._id;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/caches/MemoryCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import Bluebird = require('bluebird');
import {Cache} from '../Cache';

export default class MemoryCache implements Cache {
export class MemoryCache implements Cache {
private cache: any = {};

set<T>(key: string, value: T): Bluebird<T> {
Expand Down
2 changes: 1 addition & 1 deletion lib/caches/NoOpCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import {Cache} from '../Cache';
import Bluebird = require('bluebird');

export default class NoOpCache implements Cache {
export class NoOpCache implements Cache {
set<T>(key: string, object: T): Bluebird<T> {
return Bluebird.resolve(object);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/middleware/Express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import http = require('http');
import {MiddlewareFactory} from '../Middleware';
import {Core} from '../Core';

export default function ExpressMiddlewareFactory(core: Core): ExpressMiddleware {
export function ExpressMiddlewareFactory(core: Core): ExpressMiddleware {
return function (req: http.ServerRequest, res: http.ServerResponse, next:(err?: Error, route?: String) => void) {
core.connect().then(function() {
Object.defineProperty(req, 'db', {
Expand Down

0 comments on commit d92fce4

Please sign in to comment.