validate entry point annotation and add js code emission