config grunt and optimize main.js