-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
016e372
commit dae1c2c
Showing
5 changed files
with
64 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: {}, | ||
}); |