File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import path from 'path';
22import { cosmiconfigSync } from 'cosmiconfig' ;
33import toCamelCase from 'to-camel-case' ;
44import mergeOptions from 'merge-options' ;
5+ import normalizePath from 'normalize-path' ;
56
67export default ( { input, flags = { } } ) => {
78 const explorer = cosmiconfigSync ( 'posthtml' ) ;
@@ -69,16 +70,21 @@ export default ({input, flags = {}}) => {
6970 file = file . slice ( 1 ) ;
7071 }
7172
72- return path . join ( ignoreSymbol , path . resolve ( root ) , file ) ;
73+ return ` ${ ignoreSymbol } ${ normalizePath ( path . join ( path . resolve ( root ) , file ) ) } ` ;
7374 } ) ;
7475
7576 if ( input . length === 0 ) {
7677 throw new TypeError ( 'input files not found' ) ;
7778 }
7879
80+ output = output ?? config ?. output ;
81+ if ( output ) {
82+ output = normalizePath ( output ) ;
83+ }
84+
7985 return mergeOptions ( config ?? { } , {
8086 input,
81- output : output ?? config ?. output ,
87+ output,
8288 options,
8389 root,
8490 allInOutput
You can’t perform that action at this time.
0 commit comments