build js before the samples