@caweb/cli 1.12.2 → 1.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/sites/validation.js +0 -1
- package/lib/cli.js +1 -0
- package/lib/spinner.js +9 -9
- package/package.json +2 -2
package/lib/cli.js
CHANGED
|
@@ -114,6 +114,7 @@ function addWebpackCmds(){
|
|
|
114
114
|
.addArgument(new Argument('[files...]', 'Files or directory path to CSS files.').default(['./build']))
|
|
115
115
|
.option('--format [format]', 'Format to use for displaying report.', 'html' )
|
|
116
116
|
.option('--filename [name]', 'If using a format that outputs to a file, specify the file name.', 'css-audit' )
|
|
117
|
+
.option('--output-folder [path]', 'Where the audit should be saved.', 'audits' )
|
|
117
118
|
.option('--colors', 'Runs colors audit.', true )
|
|
118
119
|
.addOption(new Option('--no-colors', 'Skips colors audit.', false ).hideHelp())
|
|
119
120
|
.option('--important', 'Runs !important audit.', true )
|
package/lib/spinner.js
CHANGED
|
@@ -70,25 +70,25 @@ const withSpinner =
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
spinner.fail( msg )
|
|
73
|
-
process.exit( 1 );
|
|
74
|
-
|
|
75
73
|
|
|
76
|
-
|
|
77
|
-
}else if( error ){
|
|
78
|
-
//
|
|
74
|
+
// An Error was thrown.
|
|
75
|
+
}else if( error && 'object' === typeof error ){
|
|
76
|
+
// If the error has a message, use that.
|
|
79
77
|
spinner.fail(
|
|
80
78
|
typeof error === 'string' ? error : error.message
|
|
81
79
|
);
|
|
82
|
-
// Disable reason: Using console.error() means we get a stack trace.
|
|
83
|
-
console.error( error );
|
|
84
|
-
process.exit( 1 );
|
|
85
80
|
|
|
81
|
+
// Error is an unknown error. That means there was a bug in our code.
|
|
86
82
|
}else{
|
|
87
83
|
spinner.fail( 'An unknown error occurred.' );
|
|
88
|
-
|
|
84
|
+
|
|
85
|
+
// Using console.error() means we get a stack trace.
|
|
86
|
+
console.error( error );
|
|
89
87
|
|
|
90
88
|
}
|
|
91
89
|
|
|
90
|
+
process.exit( 1 );
|
|
91
|
+
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
94
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caweb/cli",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.4",
|
|
4
4
|
"description": "CAWebPublishing Command Line Interface.",
|
|
5
5
|
"exports": "./lib/env.js",
|
|
6
6
|
"type": "module",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@caweb/css-audit-webpack-plugin": "^1.0.12",
|
|
69
69
|
"@caweb/jshint-webpack-plugin": "^2.0.1",
|
|
70
70
|
"@caweb/webpack": "^1.5.0",
|
|
71
|
-
"@inquirer/prompts": "^7.
|
|
71
|
+
"@inquirer/prompts": "^7.6.0",
|
|
72
72
|
"@wordpress/create-block": "^4.69.0",
|
|
73
73
|
"@wordpress/env": "^10.26.0",
|
|
74
74
|
"axios": "^1.10.0",
|