Closed marksmccann closed 5 years ago
@phillipluther The length of getCompilerTasks
was really bugging me. I think this is a much better solution. Let me know if you disagree.
This looks great; I'd actually started down a similar break-down path to make sync/async stuff more manageable but didn't get anything checked in.
I'll merge this over and continue from here on #13
getCompilerTasks
was broken out into three logical, stand-alone functions (getOutFile
,getSourceMap
,getTasks
). As a result, the implementation is simpler and more maintainable.output
andoutFile
now support the return of directories (they simply join the resulting directory with the source file's basename).sourceMap
also now supports directories, both directly and via the dynamic iterator. It uses theoutFile
basename in either case.isFile
was also refactored to test if a given path is a file more generally, instead of checking for specific extensions. This was done so that it could be used for.map
extensions.closes #21