added lodash, rewritted onCompile and writeModules