Created
October 14, 2017 13:21
-
-
Save zzarcon/38bfc19c2f128d49f37f5eb4840f918e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import runWhen from 'run-when'; | |
runWhen([ | |
{ | |
glob: ['app/components/index.js', 'app/__tests__/**'], | |
task(paths) { | |
console.log('This will be called!'); | |
} | |
}, | |
{ | |
glob: ['!package.json'], | |
task(paths) { | |
return Promise.resolve('You can return a promise from your task'); | |
} | |
}, | |
{ | |
// Optionally pass changed files | |
changedFiles: () => Promise.resolve(['app/index.js', 'app/components/header.jsx']), | |
glob: ['app/components/**'], | |
task(paths) { | |
console.log(paths === ['app/components/header.jsx']); | |
} | |
} | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment