working registerScript with resource publish in assets folder