Skip to content

Commit

Permalink
chore: Update to latest TypeDoc 🎉 + Remove Custom Theme + Update Docu…
Browse files Browse the repository at this point in the history
…mentation (excaliburjs#2028)

Remove the git submodule simplifies the TypeDoc build
  • Loading branch information
eonarheim authored Sep 22, 2021
1 parent 7a19a09 commit 6860ff9
Show file tree
Hide file tree
Showing 31 changed files with 147 additions and 133 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: sudo gem install sass -v 3.4.24
- run: npm ci
- run: npm run linux:ci
- name: Coveralls
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
[submodule "typedoc-default-themes"]
path = typedoc-default-themes
url = https://github.com/excaliburjs/typedoc-default-themes.git
ignore = dirty
71 changes: 19 additions & 52 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"test": "karma start",
"test:watch": "karma start --auto-watch --single-run=false",
"coveralls": "echo 'Temporarily Remove Coveralls Due To Outage'",
"apidocs": "git submodule update && node scripts/apidocs.js",
"apidocs": "node scripts/apidocs.js",
"pretty": "prettier --write \"{src,sandbox/src,sandbox/tests}/**/*.{ts,js,json,css,md}\" --config prettier.config.js",
"release": "node scripts/release.js"
},
Expand Down Expand Up @@ -95,7 +95,7 @@
"sync-request": "6.1.0",
"terser-webpack-plugin": "3.1.0",
"ts-loader": "9.2.6",
"typedoc": "0.21.9",
"typedoc": "0.22.4",
"typescript": "4.4.3",
"url-loader": "4.1.1",
"wallaby-webpack": "3.9.16",
Expand Down
16 changes: 1 addition & 15 deletions scripts/apidocs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const path = require('path');
const fs = require('fs');
const child_process = require('child_process');
const rimraf = require('rimraf');
const TYPEDOC_CMD = path.join('node_modules', '.bin', 'typedoc');
Expand All @@ -12,18 +11,6 @@ console.log('Removing existing docs...');

rimraf.sync('docs/api/');

console.log('Compiling default template (default)...');
try {
if (!fs.existsSync('./typedoc-default-themes/node_modules')) {
child_process.execSync('npm install', {
cwd: './typedoc-default-themes',
stdio: [0, 1, 2]
});
}
} catch (e) {
// fails to execute Linux commands, OK
}

console.log('Executing typedoc...');

child_process.execSync(
Expand All @@ -33,14 +20,13 @@ child_process.execSync(
' API Documentation"' +
' --readme src/engine/Docs/Index.md' +
' --out docs/api' +
' --theme typedoc-default-themes/bin/default' +
' --hideGenerator' +
' --excludePrivate' +
' --listInvalidSymbolLinks' +
' --gaID UA-46390208-1' +
' --gaSite excaliburjs.com' +
' --tsconfig src/engine/tsconfig.json' +
' src/engine',
' src/engine/index.ts',
{
stdio: [0, 1, 2]
}
Expand Down
2 changes: 1 addition & 1 deletion src/engine/Actions/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ export * from './ActionQueue';
export * from './Actionable';
export * from './RotationType';

export * from './Action';
export * from './Action/Repeat';
export * from './Action/RepeatForever';

export * from './Action/Blink';
export * from './Action/Die';
export * from './Action/EaseTo';
Expand Down
34 changes: 17 additions & 17 deletions src/engine/Actor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import { Shape } from './Collision/Shapes/Shape';
import { watch } from './Util/Watch';
import { Collider } from './Collision/Index';
import { Circle } from './Graphics/Circle';
import { CapturePointerConfig } from './Input/CapturePointerConfig';

/**
* Type guard for checking if something is an Actor
Expand Down Expand Up @@ -141,10 +142,6 @@ export interface ActorArgs {
collider?: Collider;
}

export interface ActorDefaults {
anchor: Vector;
}

/**
* The most important primitive in Excalibur is an `Actor`. Anything that
* can move on the screen, collide with another `Actor`, respond to events,
Expand All @@ -154,7 +151,10 @@ export interface ActorDefaults {
export class Actor extends Entity implements Actionable, Eventable, PointerEvents, CanInitialize, CanUpdate, CanDraw, CanBeKilled {
// #region Properties

public static defaults: ActorDefaults = {
/**
* Set defaults for all Actors
*/
public static defaults = {
anchor: Vector.Half
};

Expand Down Expand Up @@ -473,15 +473,15 @@ export class Actor extends Entity implements Actionable, Eventable, PointerEvent
private _color: Color;

/**
* Whether or not to enable the [[CapturePointer]] trait that propagates
* Whether or not to enable the [[Traits.CapturePointer]] trait that propagates
* pointer events to this actor
*/
public enableCapturePointer: boolean = false;

/**
* Configuration for [[CapturePointer]] trait
* Configuration for [[Traits.CapturePointer]] trait
*/
public capturePointer: Traits.CapturePointerConfig = {
public capturePointer: CapturePointerConfig = {
captureMoveEvents: false,
captureDragEvents: false
};
Expand Down Expand Up @@ -655,15 +655,15 @@ export class Actor extends Entity implements Actionable, Eventable, PointerEvent
public on(eventName: Events.exittrigger, handler: (event: ExitTriggerEvent) => void): void;
public on(eventName: Events.entertrigger, handler: (event: EnterTriggerEvent) => void): void;
/**
* The **collisionstart** event is fired when a [[Body|physics body]], usually attached to an actor,
* first starts colliding with another [[Body|body]], and will not fire again while in contact until
* The **collisionstart** event is fired when a [[BodyComponent|physics body]], usually attached to an actor,
* first starts colliding with another [[BodyComponent|body]], and will not fire again while in contact until
* the the pair separates and collides again.
* Use cases for the **collisionstart** event may be detecting when an actor has touched a surface
* (like landing) or if a item has been touched and needs to be picked up.
*/
public on(eventName: Events.collisionstart, handler: (event: CollisionStartEvent) => void): void;
/**
* The **collisionend** event is fired when two [[Body|physics bodies]] are no longer in contact.
* The **collisionend** event is fired when two [[BodyComponent|physics bodies]] are no longer in contact.
* This event will not fire again until another collision and separation.
*
* Use cases for the **collisionend** event might be to detect when an actor has left a surface
Expand Down Expand Up @@ -722,15 +722,15 @@ export class Actor extends Entity implements Actionable, Eventable, PointerEvent
public once(eventName: Events.exittrigger, handler: (event: ExitTriggerEvent) => void): void;
public once(eventName: Events.entertrigger, handler: (event: EnterTriggerEvent) => void): void;
/**
* The **collisionstart** event is fired when a [[Body|physics body]], usually attached to an actor,
* first starts colliding with another [[Body|body]], and will not fire again while in contact until
* The **collisionstart** event is fired when a [[BodyComponent|physics body]], usually attached to an actor,
* first starts colliding with another [[BodyComponent|body]], and will not fire again while in contact until
* the the pair separates and collides again.
* Use cases for the **collisionstart** event may be detecting when an actor has touch a surface
* (like landing) or if a item has been touched and needs to be picked up.
*/
public once(eventName: Events.collisionstart, handler: (event: CollisionStartEvent) => void): void;
/**
* The **collisionend** event is fired when two [[Body|physics bodies]] are no longer in contact.
* The **collisionend** event is fired when two [[BodyComponent|physics bodies]] are no longer in contact.
* This event will not fire again until another collision and separation.
*
* Use cases for the **collisionend** event might be to detect when an actor has left a surface
Expand Down Expand Up @@ -789,15 +789,15 @@ export class Actor extends Entity implements Actionable, Eventable, PointerEvent
public off(eventName: Events.exittrigger, handler?: (event: ExitTriggerEvent) => void): void;
public off(eventName: Events.entertrigger, handler?: (event: EnterTriggerEvent) => void): void;
/**
* The **collisionstart** event is fired when a [[Body|physics body]], usually attached to an actor,
* first starts colliding with another [[Body|body]], and will not fire again while in contact until
* The **collisionstart** event is fired when a [[BodyComponent|physics body]], usually attached to an actor,
* first starts colliding with another [[BodyComponent|body]], and will not fire again while in contact until
* the the pair separates and collides again.
* Use cases for the **collisionstart** event may be detecting when an actor has touch a surface
* (like landing) or if a item has been touched and needs to be picked up.
*/
public off(eventName: Events.collisionstart, handler?: (event: CollisionStartEvent) => void): void;
/**
* The **collisionend** event is fired when two [[Body|physics bodies]] are no longer in contact.
* The **collisionend** event is fired when two [[BodyComponent|physics bodies]] are no longer in contact.
* This event will not fire again until another collision and separation.
*
* Use cases for the **collisionend** event might be to detect when an actor has left a surface
Expand Down
4 changes: 2 additions & 2 deletions src/engine/Collision/BodyComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class BodyComponent extends Component<'ex.body'> implements Clonable<Body
}

/**
* Get the moment of inertia from the [[CollisionShape]]
* Get the moment of inertia from the [[ColliderComponent]]
*/
public get inertia() {
// Inertia is a property of the geometry, so this is a little goofy but seems to be okay?
Expand All @@ -129,7 +129,7 @@ export class BodyComponent extends Component<'ex.body'> implements Clonable<Body
}

/**
* Get the inverse moment of inertial from the [[CollisionShape]]. If [[CollisionType.Fixed]] this is 0, meaning "infinite" mass
* Get the inverse moment of inertial from the [[ColliderComponent]]. If [[CollisionType.Fixed]] this is 0, meaning "infinite" mass
*/
public get inverseInertia() {
return this.collisionType === CollisionType.Fixed ? 0 : 1 / this.inertia;
Expand Down
6 changes: 2 additions & 4 deletions src/engine/Collision/Physics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ export enum CollisionResolutionStrategy {
* Possible broadphase collision pair identification strategies
*
* The default strategy is [[BroadphaseStrategy.DynamicAABBTree]] which uses a binary tree of axis-aligned bounding boxes to identify
* potential collision pairs which is O(nlog(n)) faster. The other possible strategy is the [[BroadphaseStrategy.Naive]] strategy
* which loops over every object for every object in the scene to identify collision pairs which is O(n^2) slower.
* potential collision pairs which is O(nlog(n)) faster.
*/
export enum BroadphaseStrategy {
DynamicAABBTree
Expand Down Expand Up @@ -62,8 +61,7 @@ export class Physics {
* Gets or sets the broadphase pair identification strategy.
*
* The default strategy is [[BroadphaseStrategy.DynamicAABBTree]] which uses a binary tree of axis-aligned bounding boxes to identify
* potential collision pairs which is O(nlog(n)) faster. The other possible strategy is the [[BroadphaseStrategy.Naive]] strategy
* which loops over every object for every object in the scene to identify collision pairs which is O(n^2) slower.
* potential collision pairs which is O(nlog(n)) faster.
*/
public static broadphaseStrategy: BroadphaseStrategy = BroadphaseStrategy.DynamicAABBTree;

Expand Down
4 changes: 2 additions & 2 deletions src/engine/Collision/Side.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export enum Side {

export module Side {
/**
*
* Returns the opposite side from the current
*/
export function getOpposite(side: Side): Side {
if (side === Side.Top) {
Expand All @@ -33,7 +33,7 @@ export module Side {
}

/**
*
* Given a vector, return the Side most in that direction (via dot product)
*/
export function fromDirection(direction: Vector): Side {
const directions = [Vector.Left, Vector.Right, Vector.Up, Vector.Down];
Expand Down
8 changes: 4 additions & 4 deletions src/engine/Drawing/Animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Configurable } from '../Configurable';
import { obsolete } from '../Util/Decorators';

/**
* @deprecated Use [[Graphics.HasTick]]
* @deprecated Use [[HasTick]]
*/
export interface HasTick {
/**
Expand All @@ -22,7 +22,7 @@ export interface HasTick {

/**
* @hidden
* @deprecated Use [[Graphics.Animation]]
* @deprecated Use [[Animation]]
*/
export class AnimationImpl implements Drawable, HasTick {
/**
Expand Down Expand Up @@ -356,7 +356,7 @@ export class AnimationImpl implements Drawable, HasTick {
}

/**
* @deprecated Use [[Graphics.Animation]]
* @deprecated Use [[Animation]]
*/
export interface AnimationArgs extends Partial<AnimationImpl> {
engine: Engine;
Expand All @@ -375,7 +375,7 @@ export interface AnimationArgs extends Partial<AnimationImpl> {
/**
* Animations allow you to display a series of images one after another,
* creating the illusion of change. Generally these images will come from a [[SpriteSheet]] source.
* @deprecated Use [[Graphics.Animation]]
* @deprecated Use [[Animation]]
*/
@obsolete({
message: 'Animation will be removed in v0.26.0',
Expand Down
Loading

0 comments on commit 6860ff9

Please sign in to comment.