master: add AMD support, and grunt support