Created
November 7, 2018 18:04
-
-
Save maciejcieslar/47a55a54f876621ec46368a161cfddf6 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
const parseArguments = (execution: program.Command) => { | |
const { ext = [], watch = [], ignore = [], delay = 0, exe } = execution | |
if (!exe) { | |
throw new Error('No script provided') | |
} | |
return { | |
delay, | |
extensions: ext.map((e) => `.${e}`), | |
watchedDirectories: watch, | |
ignoredDirectories: [...ignore, 'node_modules', 'build'], | |
shouldWatchEveryDirectory: not(watch.length), | |
shouldWatchEveryExtension: not(ext.length), | |
script: exe, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment