File tree 2 files changed +4
-11
lines changed
2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,7 @@ function detectUserInput () {
90
90
} else {
91
91
if ( ! ( / ^ ( h t t p ( s ) ? : ) ? \/ \/ / i. test ( validatePath ) ) ) {
92
92
if ( / ^ \/ / . test ( validatePath ) ) {
93
- validatePath = path . join ( process . cwd ( ) , validatePath ) ;
94
- } else {
95
- validatePath = path . resolve ( validatePath ) . replace ( / \\ / g, '/' ) ;
93
+ validatePath = path . resolve ( validatePath )
96
94
}
97
95
}
98
96
}
@@ -107,18 +105,13 @@ const validatePath = detectUserInput();
107
105
// ----------------------------------------
108
106
109
107
nodeW3CValidator ( validatePath , userOptions , function ( err , output ) {
110
- console . log ( err ) ;
111
108
if ( err === null ) {
112
109
process . exit ( 0 ) ;
113
110
}
114
111
console . log ( chalk . red ( 'FOUND ERRORS' ) ) ;
115
112
let outputPath = userOptions . output ;
116
113
if ( outputPath ) {
117
- if ( / ^ \/ / . test ( outputPath ) ) {
118
- outputPath = path . join ( process . cwd ( ) , outputPath ) ;
119
- } else {
120
- outputPath = path . resolve ( outputPath ) . replace ( / \\ / g, '/' ) ;
121
- }
114
+ outputPath = path . resolve ( outputPath ) ;
122
115
let message = [
123
116
chalk . red ( 'Resulting report will be written in path:' ) ,
124
117
chalk . blue ( outputPath . split ( path . sep ) . join ( '/' ) )
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " node-w3c-validator" ,
3
- "version" : " 1.2.0 " ,
3
+ "version" : " 1.2.1 " ,
4
4
"description" : " Wrapper for The Nu Html Checker (v.Nu)" ,
5
5
"main" : " ./lib/validator.js" ,
6
6
"scripts" : {
7
7
"test" : " happiness --verbose | snazzy" ,
8
- "cli-api" : " node-w3c-validator -i /tests/**/*.html -f html -o /results/cli-api-report.html" ,
8
+ "cli-api" : " node-w3c-validator -i . /tests/**/*.html -f html -o /results/cli-api-report.html" ,
9
9
"nodejs-api" : " node ./tests/demo.js" ,
10
10
"code-style" : " happiness --verbose --fix | snazzy"
11
11
},
You can’t perform that action at this time.
0 commit comments