release: WRNexusJS 0.8.0
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { definePlugin } from "@wrnexus/plugin";
|
||||
export interface ValidationPluginOptions {
|
||||
components?: boolean;
|
||||
componentDir?: string;
|
||||
}
|
||||
const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
||||
export function validationComponentsDir(): string {
|
||||
return join(packageRoot, "components");
|
||||
}
|
||||
export function validationPlugin(options: ValidationPluginOptions = {}) {
|
||||
return definePlugin({
|
||||
name: "@wrnexus/validation",
|
||||
version: "0.8.0",
|
||||
componentDirs:
|
||||
options.components === false ? [] : [options.componentDir ?? validationComponentsDir()],
|
||||
});
|
||||
}
|
||||
export default validationPlugin;
|
||||
Reference in New Issue
Block a user