-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
…le as possible for people that may not be able to run the build in some OS or setup. An upside of this is that examples and documentation can be served out of the box without having to build them. Remove package.json 'prepare' scripts because they are no longer needed, as installing from git will already include build outputs.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
node_modules | ||
# npmrc already specifies not to use package-lock, but tools like Lerna in the umbrella repo still add it, so ignore it. | ||
package-lock.json | ||
dist/ | ||
npm-debug.log | ||
*.log | ||
.vscode |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Constructor } from 'lowclass'; | ||
interface ObservableInstance { | ||
on(eventName: string, callback: Function, context?: any): void; | ||
off(eventName: string, callback?: Function): void; | ||
emit(eventName: string, data?: any): void; | ||
trigger(eventName: string, data?: any): void; | ||
triggerEvent(eventName: string, data?: any): void; | ||
} | ||
export declare function ObservableMixin<T extends Constructor>(Base: T): Constructor<ObservableInstance> & T; | ||
export declare const Observable: (new (...a: any[]) => ObservableInstance) & (new (...a: any[]) => object) & { | ||
mixin: typeof ObservableMixin; | ||
}; | ||
export interface Observable extends InstanceType<typeof Observable> { | ||
} | ||
export default Observable; | ||
//# sourceMappingURL=Observable.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<style> | ||
body { | ||
/*background: white;*/ | ||
background: rgb(30,30,30); | ||
padding: 0; | ||
margin: 0; | ||
font-family: sans-serif; | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
} | ||
a:visited { | ||
color: inherit; | ||
} | ||
|
||
template { | ||
display: none; | ||
} | ||
|
||
/* TODO: use jss for runtime styles. */ | ||
a.hash { | ||
color: #800; | ||
} | ||
</style> | ||
<link type="text/css" href="/code.css" /> | ||
</head> | ||
<body> | ||
<script type="template" id="content"> | ||
<% dox.comments.forEach(function(comment) { %> | ||
<% if (!comment.ignore) { %> | ||
|
||
<% // TODO: ignore dox that don't have a ctx. %> | ||
<div> | ||
<h1 id="<%= (comment.ctx? comment.ctx.name: comment.ctx) %>"> | ||
<a class="hash" href="#<%= (comment.ctx? comment.ctx.name: comment.ctx) %>"># </a> | ||
<%- (comment.ctx? comment.ctx.name: comment.ctx) %> | ||
</h1> | ||
|
||
<%- comment.description.full %> | ||
|
||
<pre><code class="javascript"><%= comment.code %></code></pre> | ||
</div> | ||
|
||
<% } %> | ||
<% }) %> | ||
</script> | ||
|
||
<script> | ||
// place this in a json file next to the template instead of inline here? | ||
window.dox = <%- JSON.stringify(dox) %> | ||
</script> | ||
|
||
<script src="/app.js"></script> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export {}; | ||
//# sourceMappingURL=app.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
declare module 'regexr' | ||
declare module 'at-at' | ||
declare module 'jsdoctypeparser' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import { Observable } from './Observable.js'; | ||
export declare class FileScanner extends Observable { | ||
scanFile(file: string, charset?: string): Promise<Array<Comment>>; | ||
} | ||
export declare class FolderScanner extends FileScanner { | ||
scanFolder(folder: string): Promise<FileComments[]>; | ||
} | ||
declare type Comment = { | ||
source: string; | ||
content: CommentContent; | ||
}; | ||
declare type CommentContent = Array<Tag | string>; | ||
declare type Tag = { | ||
source: string; | ||
tag: string; | ||
type: JSDocTypeAST | undefined; | ||
name: string | undefined; | ||
description: string | undefined; | ||
}; | ||
declare type JSDocTypeAST = Record<string, any>; | ||
declare type FileComments = { | ||
file: string; | ||
comments: Comment[]; | ||
}; | ||
export declare class CommentAnalyzer { | ||
scanner: FolderScanner; | ||
classes: Map<string, ClassMeta>; | ||
functions: Map<string, FunctionMeta>; | ||
analyze(folder: string, filter?: (path: string) => boolean): Promise<DocsMeta>; | ||
private trackClass; | ||
private trackMethod; | ||
private trackProperty; | ||
} | ||
export declare type PrimaryItemMeta = { | ||
file: string; | ||
}; | ||
export declare type ClassMeta = PrimaryItemMeta & { | ||
name: string; | ||
description: string; | ||
extends: string[]; | ||
abstract: boolean; | ||
properties: Record<string, PropertyMeta>; | ||
methods: Record<string, MethodMeta>; | ||
}; | ||
export declare type ClassElementMeta = { | ||
access: 'public' | 'protected' | 'private'; | ||
}; | ||
export declare type PropertyMeta = ClassElementMeta & { | ||
name: string; | ||
description?: string; | ||
type?: JSDocTypeAST; | ||
}; | ||
export declare type FunctionLikeMeta = { | ||
name: string; | ||
description?: string; | ||
params: Param[]; | ||
returns?: JSDocTypeAST; | ||
}; | ||
export declare type FunctionMeta = PrimaryItemMeta & FunctionLikeMeta; | ||
export declare type MethodMeta = ClassElementMeta & FunctionLikeMeta; | ||
export declare type Param = { | ||
name: string; | ||
description?: string; | ||
type?: JSDocTypeAST; | ||
}; | ||
export declare type DocsMeta = { | ||
sourceFolder: string; | ||
classes: Map<string, ClassMeta>; | ||
functions: Map<string, FunctionMeta>; | ||
}; | ||
export declare class MarkdownRenderer { | ||
render(docsMeta: DocsMeta, destination: string): Promise<void>; | ||
private resolveDestination; | ||
renderNav(docsMeta: DocsMeta, options?: { | ||
linePadStart?: string; | ||
basePath?: string; | ||
}): string; | ||
renderClass(className: string, classMeta: ClassMeta, docsMeta: DocsMeta): string; | ||
renderProperty(propertyName: string, propertyMeta: PropertyMeta, _docsMeta: DocsMeta): string; | ||
renderMethod(methodName: string, methodMeta: MethodMeta, _docsMeta: DocsMeta): string; | ||
} | ||
export declare const version = "0.2.7"; | ||
export {}; | ||
//# sourceMappingURL=index.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.