diff --git a/README.md b/README.md index 7414c2d..98ec6b9 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ ## About This package provides support for writing reusable Alpine.js components in Typescript. Supporting Alpine's existing model of registering any generic object/type and user-defined -classes inheriting from the [AlpineComponent class](./src/Component.ts) which provides type +classes inheriting from the [AlpineComponent class](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/src/Component.ts) which provides type definitions for Alpine's magics. This enables your IDE to give useful auto-completion without any extra plugins/extensions and gives Typescript a better understanding of your component code, producing useful compilation/transpilation errors before testing. @@ -65,10 +65,27 @@ import Alpine from 'alpinejs'; window.Alpine = Alpine; -import { componentPlugin } from '@nxtlvlsoftware/alpine-typescript'; +import {componentPlugin} from '@nxtlvlsoftware/alpine-typescript'; -Alpine.plugin(componentPlugin); -Alpine.start(); +window.addEventListener('alpine-components:init', () => { + // window.Alpine.Components.register(); +}); + +window.Alpine.plugin(componentPlugin); +window.Alpine.start(); +``` +Using the default export: +```typescript +import Alpine from 'alpinejs'; + +window.Alpine = Alpine; + +window.addEventListener('alpine-components:init', () => { + // window.Alpine.Components.register(); +}); + +window.Alpine.plugin(require('@nxtlvlsoftware/alpine-typescript')); +window.Alpine.start(); ``` This is the easiest way to get started in existing projects but doesn't offer a way to modify the default options provided the package. @@ -79,16 +96,22 @@ import Alpine from 'alpinejs'; window.Alpine = Alpine; -import { AlpineComponents } from '@nxtlvlsoftware/alpine-typescript'; +import {AlpineComponents} from '@nxtlvlsoftware/alpine-typescript'; -AlpineComponents.bootstrap(); +AlpineComponents.bootstrap({ + components: { + // + }}); ``` The default options are best suited to new projects and automatically starts Alpine for you. To integrate into existing projects seamlessly, just pass in an options object: ```typescript -import { AlpineComponents } from '@nxtlvlsoftware/alpine-typescript'; +import {AlpineComponents} from '@nxtlvlsoftware/alpine-typescript'; AlpineComponents.bootstrap({ + components: { + // + }, startAlpine: false, logErrors: true // should only enable this in dev enviroments for debugging }); // pass the Alpine object explicity if you aren't following the default convention @@ -102,10 +125,13 @@ import Alpine from 'alpinejs'; let myAlpine = Alpine; -import { AlpineComponents } from '@nxtlvlsoftware/alpine-typescript'; +import {AlpineComponents} from '@nxtlvlsoftware/alpine-typescript'; const isProduction = () => false; // equivelent would be injected/definied server-side by your framework AlpineComponents.bootstrap({ + components: { + // + }, logErrors: !isProduction() }, myAlpine); @@ -122,13 +148,13 @@ This package is designed to be easily integrated into existing projects. You can migrating complex, logic heavy components into classes without worrying about the simple stuff that makes Alpine so powerful. -Take a look at the provided example project [here.](./examples/project) +Take a look at the provided example project [here.](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/examples/project) ##### Project Setup -You'll want to start by [installing](#installation) the package then add these lines to your +You'll want to start by [installing](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/README.md#installation) the package then add these lines to your client script: ```typescript -import { AlpineComponents } from '@nxtlvlsoftware/alpine-typescript'; +import {AlpineComponents} from '@nxtlvlsoftware/alpine-typescript'; AlpineComponents.bootstrap({ components: { @@ -142,9 +168,9 @@ AlpineComponents.bootstrap({ Now create a directory for your components, something like `components` and create a new Typescript file `components/MyComponent.ts` containing: ```typescript -import { AlpineComponent } from "@nxtlvlsoftware/alpine-typescript"; +import {AlpineComponent} from "@nxtlvlsoftware/alpine-typescript"; -export class MyComponent extends AlpineComponent { +export class MyComponent extends AlpineComponent { constructor( public required: string, @@ -161,7 +187,7 @@ export class MyComponent extends AlpineComponent { ``` Register your new component in the `AlpineComponents.bootstrap()` method call: ```typescript -import { MyComponent } from './components/MyComponent'; +import {MyComponent} from './components/MyComponent'; AlpineComponents.bootstrap({ components: { @@ -174,10 +200,10 @@ You can now use the component in your HTML with `x-data="myComponent('Hello Worl #### In Packages The main purpose of this package is to easily distribute components in their own package. -Take a look at the provided example components package [here.](./examples/package) +Take a look at the provided example components package [here.](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/examples/package) ##### Package Setup -The easiest way to start distributing your components is to copy everything from the [package example](./examples/package) +The easiest way to start distributing your components is to copy everything from the [package example](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/examples/package) directory and start writing your components. Manual setup requires a project with `typescript` installed to compile the code to javascript: @@ -288,13 +314,12 @@ export namespace MyComponents { // Support loading our components with a standardized call to Alpine.plugin(). export function myPlugin(alpine: Globals.Alpine): void { - MyComponents.bootstrap( - { - // can't assume we're the only ones using the component library - bootstrapComponents: false, - // definitely not the only ones using alpine if we're being used as a plugin here - startAlpine: false - }, alpine); + MyComponents.bootstrap({ + // can't assume we're the only ones using the component library + bootstrapComponents: false, + // definitely not the only ones using alpine if we're being used as a plugin here + startAlpine: false + }, alpine); } ``` Export the `MyComponent` namespace and `myPlugin()` function as default from `index.ts`: @@ -307,7 +332,7 @@ export { /** * Alpine plugin as default export. */ -import { myPlugin } from './src/Plugin'; +import {myPlugin} from './src/Plugin'; export default myPlugin; ``` Now you can start writing your components. Remember to create the `src/components/MyComponent.ts` @@ -325,7 +350,7 @@ Any function that satisfies this type requirement: ```typescript type KnownGenericConstructor = (...args: any[]) => T; ``` -Will be accepted as a component constructor. The [signature](./src/Store.ts#L101) for registering components of this type is: +Will be accepted as a component constructor. The [signature](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/src/Store.ts#L101) for registering components of this type is: ```typescript /** * Register a generic object (alpine data) as a component. @@ -364,16 +389,21 @@ Or by listening for the `alpine-components:init` on the `document` global: document.addEventListener('alpine-components:init', () => { window.Alpine.Components.register('noArgs', noArgsComponent); window.Alpine.Components.register('singleValue', singleValueComponent); + // or registerAll() when component names are hardcoded + window.Alpine.Components.registerAll({ + noArgs: noArgsComponent, + singleValue: singleValueComponent + }); }); ``` ##### Typescript Classes The main purpose of this package is to use class definitions as Alpine components. Any class -inheriting from [AlpineComponent](./src/Component#L45) is accepted. +inheriting from [AlpineComponent](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/src/Component#L45) is accepted. Both register function definitions accept constructor functions for these classes. -Explicit register class constructor [signature](src/Store.ts#L109): +Explicit register class constructor [signature](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/src/Store.ts#L109): ```typescript /** * Register a class inheriting from {@link Impl.AlpineComponent} as a component. @@ -385,7 +415,7 @@ register(component: Impl.KnownClassConstructor(name: string, component: Impl.KnownConstructor): void; ``` -The component parameters prototype is checked for inheritance from the [AlpineComponent](./src/Component#L45) +The component parameters prototype is checked for inheritance from the [AlpineComponent](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/src/Component#L45) class and handled accordingly. #### Using Components @@ -417,21 +447,20 @@ Here's the contrived `dropdown` example re-written to use a class: window.Alpine = Alpine; - import { AlpineComponents, AlpineComponent } from '@nxtlvlsoftware/alpine-typescript'; + import {AlpineComponents, AlpineComponent} from '@nxtlvlsoftware/alpine-typescript'; class ToggleComponent extends AlpineComponent { constructor( - open: boolean = false + public open: boolean = false ) { super(); } - toggle() { this.open = !open; } + toggle(): void { this.open = !this.open; } } - window.addEventListener('alpine-components:init', () => { - window.Alpine.Components.register(ToggleComponent, 'toggle'); - }); - AlpineComponents.bootstrap({ + components: { + toggle: ToggleComponent + }, logErrors: true }); diff --git a/examples/package/index.ts b/examples/package/index.ts index 0c14d09..c1dc15f 100644 --- a/examples/package/index.ts +++ b/examples/package/index.ts @@ -2,8 +2,8 @@ * Export functions and types. */ -export { AlertComponent } from './src/components/AlertComponent'; -export { ToggleComponent } from './src/components/ToggleComponent'; +export {AlertComponent} from './src/components/AlertComponent'; +export {ToggleComponent} from './src/components/ToggleComponent'; export { MyComponents, @@ -14,5 +14,5 @@ export { /** * Alpine plugin as default export. */ -import { myPlugin } from './src/Plugin'; +import {myPlugin} from './src/Plugin'; export default myPlugin; diff --git a/examples/package/src/Plugin.ts b/examples/package/src/Plugin.ts index 9b91822..61c0e09 100644 --- a/examples/package/src/Plugin.ts +++ b/examples/package/src/Plugin.ts @@ -92,7 +92,7 @@ export namespace MyComponents { if (opts.bootstrapComponents) { AlpineComponents.bootstrap(opts, alpine); } - }; + } } diff --git a/examples/package/src/components/AlertComponent.ts b/examples/package/src/components/AlertComponent.ts index ec96dbe..3df7285 100644 --- a/examples/package/src/components/AlertComponent.ts +++ b/examples/package/src/components/AlertComponent.ts @@ -1,4 +1,4 @@ -import { AlpineComponent } from "@nxtlvlsoftware/alpine-typescript"; +import {AlpineComponent} from "@nxtlvlsoftware/alpine-typescript"; export const DefaultAlertComponentName = 'alert'; @@ -8,7 +8,7 @@ export const DefaultAlertComponentName = 'alert'; * All properties and events are prefixed with 'alert' to make * it clear which variables belong to the component in the HTML. */ -export class AlertComponent extends AlpineComponent { +export class AlertComponent extends AlpineComponent { constructor( public alertState: boolean = false diff --git a/examples/package/src/components/ToggleComponent.ts b/examples/package/src/components/ToggleComponent.ts index 18e61ef..d78aad4 100644 --- a/examples/package/src/components/ToggleComponent.ts +++ b/examples/package/src/components/ToggleComponent.ts @@ -1,4 +1,4 @@ -import { AlpineComponent } from '@nxtlvlsoftware/alpine-typescript'; +import {AlpineComponent} from '@nxtlvlsoftware/alpine-typescript'; export const DefaultToggleComponentName: string = 'toggle'; @@ -8,7 +8,7 @@ export const DefaultToggleComponentName: string = 'toggle'; * All properties and events are prefixed with 'switch' to make * it clear which variables belong to the component in the HTML. */ -export class ToggleComponent extends AlpineComponent { +export class ToggleComponent extends AlpineComponent { constructor( public toggleState: boolean = false diff --git a/examples/project/src/components/AlertComponent.ts b/examples/project/src/components/AlertComponent.ts index 346f03f..2b6ba6f 100644 --- a/examples/project/src/components/AlertComponent.ts +++ b/examples/project/src/components/AlertComponent.ts @@ -1,4 +1,4 @@ -import { AlpineComponent } from "@nxtlvlsoftware/alpine-typescript"; +import {AlpineComponent} from "@nxtlvlsoftware/alpine-typescript"; /** * Simple alert component for closing the default alert. @@ -6,7 +6,7 @@ import { AlpineComponent } from "@nxtlvlsoftware/alpine-typescript"; * All properties and events are prefixed with 'alert' to make * it clear which variables belong to the component in the HTML. */ -export class AlertComponent extends AlpineComponent { +export class AlertComponent extends AlpineComponent { constructor( public alertState: boolean = false diff --git a/examples/project/src/components/ToggleComponent.ts b/examples/project/src/components/ToggleComponent.ts index 9ee77df..ceada28 100644 --- a/examples/project/src/components/ToggleComponent.ts +++ b/examples/project/src/components/ToggleComponent.ts @@ -1,4 +1,4 @@ -import { AlpineComponent } from "@nxtlvlsoftware/alpine-typescript"; +import {AlpineComponent} from "@nxtlvlsoftware/alpine-typescript"; /** * Simple toggle that switches between on/off values. @@ -6,7 +6,7 @@ import { AlpineComponent } from "@nxtlvlsoftware/alpine-typescript"; * All properties and events are prefixed with 'toggle' to make * it clear which variables belong to the component in the HTML. */ -export class ToggleComponent extends AlpineComponent { +export class ToggleComponent extends AlpineComponent { constructor( public toggleState: boolean = false diff --git a/examples/project/src/index.ts b/examples/project/src/index.ts index 376e9a5..4100a85 100644 --- a/examples/project/src/index.ts +++ b/examples/project/src/index.ts @@ -4,10 +4,10 @@ import Alpine from 'alpinejs'; window.Alpine = Alpine; -import { AlpineComponents } from '@nxtlvlsoftware/alpine-typescript'; +import {AlpineComponents} from '@nxtlvlsoftware/alpine-typescript'; import {AlertComponent} from "./components/AlertComponent"; -import { ToggleComponent } from "./components/ToggleComponent"; +import {ToggleComponent} from "./components/ToggleComponent"; AlpineComponents.bootstrap({ components: { diff --git a/index.js b/index.js index 1307b4f..76d6408 100644 --- a/index.js +++ b/index.js @@ -4,4 +4,4 @@ export * as Globals from './src/Global'; export { AlpineComponents, componentsPlugin } from './src/Plugin'; import { componentsPlugin } from './src/Plugin'; export default componentsPlugin; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQSxPQUFPLEVBTU4sZUFBZSxFQUNmLE1BQU0saUJBQWlCLENBQUE7QUFFeEIsT0FBTyxFQUVOLGNBQWMsRUFDZCxxQkFBcUIsRUFDckIscUJBQXFCLEVBQ3JCLE1BQU0sYUFBYSxDQUFBO0FBRXBCLE9BQU8sS0FBSyxPQUFPLE1BQU0sY0FBYyxDQUFDO0FBRXhDLE9BQU8sRUFDTixnQkFBZ0IsRUFDaEIsZ0JBQWdCLEVBQ2hCLE1BQU0sY0FBYyxDQUFDO0FBTXRCLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUNoRCxlQUFlLGdCQUFnQixDQUFDIn0= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQSxPQUFPLEVBTU4sZUFBZSxFQUNmLE1BQU0saUJBQWlCLENBQUE7QUFFeEIsT0FBTyxFQUVOLGNBQWMsRUFDZCxxQkFBcUIsRUFDckIscUJBQXFCLEVBQ3JCLE1BQU0sYUFBYSxDQUFBO0FBRXBCLE9BQU8sS0FBSyxPQUFPLE1BQU0sY0FBYyxDQUFDO0FBRXhDLE9BQU8sRUFDTixnQkFBZ0IsRUFDaEIsZ0JBQWdCLEVBQ2hCLE1BQU0sY0FBYyxDQUFDO0FBTXRCLE9BQU8sRUFBQyxnQkFBZ0IsRUFBQyxNQUFNLGNBQWMsQ0FBQztBQUM5QyxlQUFlLGdCQUFnQixDQUFDIn0= diff --git a/index.ts b/index.ts index 7312553..cdd4f46 100644 --- a/index.ts +++ b/index.ts @@ -29,5 +29,5 @@ export { /** * Alpine plugin as default export. */ -import { componentsPlugin } from './src/Plugin'; +import {componentsPlugin} from './src/Plugin'; export default componentsPlugin; diff --git a/package.json b/package.json index 881c750..6ebf4ef 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "build": "tsc --inlineSourceMap --removeComments -p ./", "build-ci": "tsc --pretty false --inlineSourceMap --removeComments --listEmittedFiles -p ./", "dev": "tsc --watch -p ./", - "docs": "npx typedoc --out docs-build --cacheBust index.ts", - "docs-ci": "npx typedoc --gitRemote dist --out docs-build --cacheBust index.ts" + "docs": "npx typedoc --plugin typedoc-plugin-extras --out docs-build --cacheBust index.ts", + "docs-ci": "npx typedoc --plugin typedoc-plugin-extras --gitRemote dist --out docs-build --cacheBust index.ts" }, "keywords": [ "alpine", @@ -31,6 +31,7 @@ }, "devDependencies": { "typedoc": "^0.25.1", + "typedoc-plugin-extras": "^3.0.0", "typescript": "^5.1.6" } } diff --git a/src/Component.d.ts b/src/Component.d.ts index 451ef35..9804e51 100644 --- a/src/Component.d.ts +++ b/src/Component.d.ts @@ -7,13 +7,13 @@ export declare interface AlpineDataContext { [stateKey: string]: any; } export declare type AlpineData = AlpineDataContext | string | number | boolean; -export declare abstract class AlpineComponent implements AlpineDataContext { - $data: T; +export declare abstract class AlpineComponent implements AlpineDataContext { + $data: this; $el: HTMLElement; $refs: Record; $store: AlpineData; $dispatch: (event: string, data?: any) => void; $id: (name: string, key?: number | string) => string; $nextTick: (callback?: () => void) => Promise; - $watch: (property: K, callback: (newValue: V, oldValue: V) => void) => void; + $watch: (property: K, callback: (newValue: V, oldValue: V) => void) => void; } diff --git a/src/Component.ts b/src/Component.ts index 3ff7809..c46d828 100644 --- a/src/Component.ts +++ b/src/Component.ts @@ -42,12 +42,12 @@ export declare type AlpineData = AlpineDataContext | string | number | boolean; * * Property declarations copied from @types/alpinejs. */ -export abstract class AlpineComponent implements AlpineDataContext { +export abstract class AlpineComponent implements AlpineDataContext { /** * Access to current Alpine data. */ - declare $data: T; + declare $data: this; /** * Retrieve the current DOM node. @@ -93,7 +93,7 @@ export abstract class AlpineComponent implements AlpineDataContext { * @param property the component property * @param callback a callback that will fire when a given property is changed */ - declare $watch: ( + declare $watch: ( property: K, callback: (newValue: V, oldValue: V) => void, ) => void; diff --git a/src/Store.js b/src/Store.js index 3f21da4..4bc8f89 100644 --- a/src/Store.js +++ b/src/Store.js @@ -133,7 +133,16 @@ var ComponentStore = (function () { }()); export { ComponentStore }; export function transformToAlpineData(instance) { - return __spreadArray(__spreadArray([], Object.getOwnPropertyNames(Object.getPrototypeOf(instance)), true), Object.getOwnPropertyNames(instance), true).reduce(function (obj, name) { + var methodNames = []; + for (var prototype = Object.getPrototypeOf(instance); prototype.constructor.name !== 'Object'; prototype = Object.getPrototypeOf(prototype)) { + Object.getOwnPropertyNames(prototype).forEach(function (name) { + if (methodNames.includes(name)) { + return; + } + methodNames.push(name); + }); + } + return __spreadArray(__spreadArray([], methodNames, true), Object.getOwnPropertyNames(instance), true).reduce(function (obj, name) { obj[name] = instance[name]; return obj; }, {}); @@ -147,4 +156,4 @@ export function makeAlpineConstructor(component) { return transformToAlpineData(new (component.bind.apply(component, __spreadArray([void 0], args, false)))()); }; } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU3RvcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJTdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFHQSxPQUFPLEVBQUMsZUFBZSxFQUFrQyxNQUFNLGFBQWEsQ0FBQztBQUs3RSxJQUFNLGFBQWEsR0FBRyxDQUFDLFVBQVUsRUFBRSxXQUFXLEVBQUUsT0FBTyxFQUFFLFNBQVMsRUFBRSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU07SUFDMUYsT0FBTyxFQUFFLE1BQU0sRUFBRSxPQUFPLEVBQUUsT0FBTyxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsU0FBUyxFQUFFLFFBQVEsRUFBRSxJQUFJLEVBQUUsUUFBUSxFQUFFLE1BQU07SUFDdEcsTUFBTSxFQUFFLE1BQU0sRUFBRSxRQUFRLEVBQUUsU0FBUyxFQUFFLE9BQU8sRUFBRSxPQUFPLEVBQUUsU0FBUyxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU07SUFDcEcsSUFBSSxFQUFFLFlBQ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0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDeEIsQ0FBQyxDQUFDLENBQUM7S0FDSDtJQUVELE9BQU8sZ0NBQ0gsV0FBVyxTQUNYLE1BQU0sQ0FBQyxtQkFBbUIsQ0FBQyxRQUFRLENBQUMsUUFDdEMsTUFBTSxDQUFDLFVBQUMsR0FBRyxFQUFFLElBQUk7UUFFbEIsR0FBRyxDQUFDLElBQUksQ0FBQyxHQUFHLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUUzQixPQUFPLEdBQUcsQ0FBQztJQUNaLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQztBQUNSLENBQUM7QUFPRCxNQUFNLFVBQVUscUJBQXFCLENBQTRCLFNBQXdDO0lBQ3hHLE9BQU87UUFBQyxjQUFjO2FBQWQsVUFBYyxFQUFkLHFCQUFjLEVBQWQsSUFBYztZQUFkLHlCQUFjOztRQUFLLE9BQUEscUJBQXFCLE1BQUssU0FBUyxZQUFULFNBQVMsMEJBQUksSUFBSSxhQUFFO0lBQTdDLENBQTZDLENBQUM7QUFDMUUsQ0FBQyJ9 diff --git a/src/Store.ts b/src/Store.ts index a4ab9d3..e639d4d 100644 --- a/src/Store.ts +++ b/src/Store.ts @@ -200,8 +200,22 @@ export class ComponentStore { * @param instance The object to copy functions and properties from */ export function transformToAlpineData(instance: T): object { + let methodNames: string[] = []; + for ( + let prototype = Object.getPrototypeOf(instance); + prototype.constructor.name !== 'Object'; + prototype = Object.getPrototypeOf(prototype) + ) { + Object.getOwnPropertyNames(prototype).forEach((name: string) => { + if (methodNames.includes(name)) { + return; + } + methodNames.push(name); + }); + } + return [ - ...Object.getOwnPropertyNames(Object.getPrototypeOf(instance)), // methods + ...methodNames, // methods ...Object.getOwnPropertyNames(instance) // properties ].reduce((obj, name) => { // @ts-ignore diff --git a/typedoc.json b/typedoc.json index 99f1939..917daab 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,8 +1,12 @@ { + "favicon": "https://nxtlvlsoftware.github.io/alpine-typescript/favicon.ico", + "footerTypedocVersion": true, + "footerDate": true, + "footerTime": true, "sidebarLinks": { "GitHub": "https://github.com/NxtLvlSoftware/alpine-typescript", "Twitter": "https://twitter.com/NxtLvlSoftware", - "Home": "/index.html", + "Home": "https://nxtlvlsoftware.github.io/alpine-typescript/", "Example": "https://nxtlvlsoftware.github.io/alpine-typescript/example/" } } \ No newline at end of file