Firstly, you should go and read how to use NPM as a build tool. Then come back here and explore the repository. It's fairly standard, and the bare minimum to show you what a complex config would look like.
See some areas for optimising? Great! Send a PR, I'm definitely interested in seeing some great ways to optimise this.