I am using a page with ui:composition use on it like this
You do not have to do this using ui:inserts. Wherever you need to add a javascript file in your pages. Just add like this using resource API.
For this create folder WebContent/resources/javascript and put that 1.js in javascript folder.