Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Oct 14, 2023
1 parent 016e372 commit dae1c2c
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 58 deletions.
49 changes: 49 additions & 0 deletions Source/Function/Integration.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/**
* @module Integration
*
*/
export default (_Option: Option = {}): AstroIntegration => {
for (const Option in _Option) {
if (
Object.prototype.hasOwnProperty.call(_Option, Option) &&
_Option[Option] === true
) {
_Option[Option] = Default[Option as keyof typeof Default];
}
}

const { Path } = Merge(Default, _Option);

const Paths = new Set<Path>();

if (typeof Path !== "undefined") {
if (Array.isArray(Path) || Path instanceof Set) {
for (const _Path of Path) {
Paths.add(_Path);
}
}
}

return {
name: "astro-dead-links",
hooks: {
"astro:build:done": async ({ dir }) => {
if (!Paths.size) {
Paths.add(dir);
}
},
},
};
};

import type Option from "../Interface/Option.js";

import type Path from "files-pipe/Target/Interface/Path.js";

import type { AstroIntegration } from "astro";

export const { default: Default } = await import("../Variable/Option.js");

export const { default: Merge } = await import(
"typescript-esbuild/Target/Function/Merge.js"
);
46 changes: 0 additions & 46 deletions Source/Index.ts

This file was deleted.

6 changes: 6 additions & 0 deletions Source/Interface/Option.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import type Option from "files-pipe/Target/Interface/Option.js";

export default interface Type extends Option {
// biome-ignore lint/suspicious/noExplicitAny:
[key: string]: any;
}
12 changes: 0 additions & 12 deletions Source/Option/Index.ts

This file was deleted.

9 changes: 9 additions & 0 deletions Source/Variable/Option.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @module Option
*
*/
export default (
await import("typescript-esbuild/Target/Function/Merge.js")
).default((await import("files-pipe/Target/Variable/Option.js")).default, {
Action: {},
});

0 comments on commit dae1c2c

Please sign in to comment.