Alexandre Babeanu Alexandre Babeanu - 28 days ago 12
Node.js Question

Automatically create grunt environment

I'm a little lost as to how I should proceed, actually I don't even know where to start.
I've been working on a few wordpress sites lately, usually I create a dev environment using npm grunt.

I set up a folder and do npm init. Then I install all the grunt plugins I need such as: watch, sass, uglify etc... I then download wordpress and set up the gruntfile.js so that for example my sass will compile to my wordpress theme's stylesheet. Just the usual (I hope).

The thing is rather than always repeating the same step over and over I'd like to automate it ( same config step for each site ).

So here is my question, how do you go about creating a script that will automaticaly install grunt plugins and configure them, download the latest wordpress and set up the theme files ( domain name etc...)?

I don't need an explanation on how to do all these steps but just a few pointers on where to start and what tools to use would be great. Being quite the novice in script writing any information is good to use.

Answer

Try yeoman.

There is yeoman generator for wordperss boilerplate. It uses gulp instead grunt, but has same idea that you need.

Comments