feat(js) Improved JS boilerplate

Correct generated paths, extracted more commonalities from JS components