File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 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')()
1717const argv = require ( './lib/args' )
1818const depGraph = require ( './lib/depGraph' )
1919
20- const dir = argv . dir
21-
2220let input = argv . _
23- const output = argv . output
21+ const { dir , output } = argv
2422
2523if ( argv . map ) argv . map = { inline : false }
2624
@@ -101,10 +99,10 @@ Promise.resolve()
10199 watcher . on ( 'ready' , printMessage ) . on ( 'change' , file => {
102100 let recompile = [ ]
103101
104- if ( ~ input . indexOf ( file ) ) recompile . push ( file )
102+ if ( input . includes ( file ) ) recompile . push ( file )
105103
106104 recompile = recompile . concat (
107- depGraph . dependantsOf ( file ) . filter ( file => ~ input . indexOf ( file ) )
105+ depGraph . dependantsOf ( file ) . filter ( file => input . includes ( file ) )
108106 )
109107
110108 if ( ! recompile . length ) recompile = input
@@ -136,7 +134,7 @@ function rc(ctx, path) {
136134 return rc
137135 } )
138136 . 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
140138 } )
141139}
142140
You can’t perform that action at this time.
0 commit comments