Factor js out of task.vwf.yaml into task.js

@BrettASwift or @kadst43 could you review?