This is more of a question without code so, please forgive me.
Is there a way programatically create a Package.json, karma.conf.js and gruntfile.js without building them individually.
I want to automate the process without having to build each one individually.
Also, the same for creating a Spec.js file for describe testing
You could look into Yeoman generators to see if any of the pre-existing ones are in line with what you are aiming to create. It's a fairly straight forward node tool that scaffolds out an app skeleton for you.
http://yeoman.io/generators/
If not, there's a fair bit of information available on how to write your own generator here: http://yeoman.io/authoring/