File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ export {
28
28
} from "./lib/output" ;
29
29
export type { RenderTemplate , RendererHooks } from "./lib/output" ;
30
30
31
+ export { Validator } from "./lib/validation" ;
32
+
31
33
export {
32
34
ArgumentsReader ,
33
35
BindOption ,
Original file line number Diff line number Diff line change
1
+ export { Validator } from "./validator" ;
Original file line number Diff line number Diff line change
1
+ export const ValidatorEvents = {
2
+ RUN : "run_validator" ,
3
+ } as const ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { ValidatorComponent } from "./components";
6
6
import { validateExports } from "./exports" ;
7
7
import { validateDocumentation } from "./documentation" ;
8
8
import { validateLinks } from "./links" ;
9
+ import { ValidatorEvents } from "./validator-events" ;
9
10
10
11
@Component ( {
11
12
name : "validator" ,
@@ -16,6 +17,17 @@ export class Validator extends ChildableComponent<
16
17
Application ,
17
18
ValidatorComponent
18
19
> {
20
+ /**
21
+ * General events
22
+ */
23
+
24
+ /**
25
+ * Triggered when the converter begins converting a project.
26
+ * The listener will be given a {@link Context} object.
27
+ * @event
28
+ */
29
+ static readonly EVENT_RUN = ValidatorEvents . RUN ;
30
+
19
31
constructor ( owner : Application ) {
20
32
super ( owner ) ;
21
33
}
@@ -44,6 +56,8 @@ export class Validator extends ChildableComponent<
44
56
validateLinks ( project , this . application . logger ) ;
45
57
}
46
58
59
+ this . trigger ( Validator . EVENT_RUN , project ) ;
60
+
47
61
this . application . logger . verbose (
48
62
`Validation took ${ Date . now ( ) - start } ms`
49
63
) ;
You can’t perform that action at this time.
0 commit comments