convert to js on publish