draft of js optimize using require.. and html apps folders migration