If you get errors in the javascript with regards to line 1 which is almost always a comment, ignore it.
I've been able to build widgets and get them on the emulator by hitting run and it builds a working widget and pushes it to the emulator all in one.