refactor(stopLight.js) added a compile function that does the element condition check and only it passes, then does it return the link function

Signed-off-by: Josh Kurz <josh.kurz@turner.com>