File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,9 @@ import validateTranslation from '../../services/translation/validate';
10
10
11
11
const helperText = `
12
12
Usage:
13
- --validate-schema sample-widget/schema.json
14
- --validate-query-params sample-widget/queryParamsBuilder.json
13
+ widget-builder validate --schema sample-widget
14
+ widget-builder validate --query-params sample-widget
15
+ widget-builder validate --translation sample-widget
15
16
` ;
16
17
17
18
const validateCommands = ( ) => {
@@ -24,12 +25,13 @@ const validateCommands = () => {
24
25
. option ( '--translation' , 'validates schema_translation.json file' )
25
26
. addHelpText ( 'afterAll' , helperText )
26
27
. action ( ( name , options ) => {
27
- const directory = path . resolve ( '.' ) ;
28
- if ( options . validateSchema ) {
28
+ const directory = path . resolve ( '.' , name ) ;
29
+
30
+ if ( options . schema ) {
29
31
validateSchema ( directory ) ;
30
32
}
31
33
32
- if ( options . validateQueryParamsBuilder ) {
34
+ if ( options . queryParams ) {
33
35
validateQueryParamsBuilder ( directory ) ;
34
36
}
35
37
You can’t perform that action at this time.
0 commit comments