File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,8 @@ const reporter = require('postcss-reporter/lib/formatter')()
17
17
const argv = require ( './lib/args' )
18
18
const depGraph = require ( './lib/depGraph' )
19
19
20
- const dir = argv . dir
21
-
22
20
let input = argv . _
23
- const output = argv . output
21
+ const { dir , output } = argv
24
22
25
23
if ( argv . map ) argv . map = { inline : false }
26
24
@@ -101,10 +99,10 @@ Promise.resolve()
101
99
watcher . on ( 'ready' , printMessage ) . on ( 'change' , file => {
102
100
let recompile = [ ]
103
101
104
- if ( ~ input . indexOf ( file ) ) recompile . push ( file )
102
+ if ( input . includes ( file ) ) recompile . push ( file )
105
103
106
104
recompile = recompile . concat (
107
- depGraph . dependantsOf ( file ) . filter ( file => ~ input . indexOf ( file ) )
105
+ depGraph . dependantsOf ( file ) . filter ( file => input . includes ( file ) )
108
106
)
109
107
110
108
if ( ! recompile . length ) recompile = input
@@ -136,7 +134,7 @@ function rc(ctx, path) {
136
134
return rc
137
135
} )
138
136
. catch ( err => {
139
- if ( err . message . indexOf ( 'No PostCSS Config found' ) === - 1 ) throw err
137
+ if ( ! err . message . includes ( 'No PostCSS Config found' ) ) throw err
140
138
} )
141
139
}
142
140
You can’t perform that action at this time.
0 commit comments