copies js in the same way that css is copied