Giter Site home page Giter Site logo

grunt-wp-deploy-boilerplate's Introduction

Grunt WP Deployment Boilerplate

These are the base files necessary to start using grunt-wordpress-deploy for a WordPress theme/installation

Requirements

You must have Node.js and npm installed. Get em.

This project also uses Grunt – which will be installed in the target folder using when npm install is run – but you'll need to install the Grunt command line interface (grunt-cli) 'globally' so you can use the grunt alias on the command line. (If this doesn't make any sense, it's OK. Just follow the Grunt Getting Started instructions linked above and they'll walk you through it).

Dependencies

If you're familiar with traditional Gruntfile.js structures you might notice an odd-looking Gruntfile here – there are two reasons:

  1. This project utilizes the load-grunt-config package to allow modularization of Grunt tasks. Each file in the ./grunt directory represents an auto-loaded Grunt task (named like {TASK_NAME}.coffee). The meat-and-potatoes in Gruntile.coffee is the line that initializes this package:

     require('load-grunt-config')(grunt, config)
    

For the purposes of this project, you don't really need to understand ths ins and outs of the Gruntfile. We'll almost exclusively be looking at and modifying wordpressdeploy.coffee.

  1. You're looking at Coffeescript, not Javascript. I generally don't write in coffee when developing WP themes, but I always use it for creating Grunt and task files, since it makes for a much leaner and more readable file.

Let's do this

Clone this repo somewhere (anwywhere, really) on your machine:

git clone https://github.com/jambox/grunt-wp-deploy-boilerplate.git

Copy the files into your WP theme folder.

Use your command line tool of choice (I prefer iTerm2 with oh-my-zsh installed) and navigate to your theme folder.

cd /Applications/MAMP/htdocs/client-site.com/wp-content/themes/client_name-theme/

Install the node packages using npm

npm install

Get on with your damn life.

That's it! You should be setup to push/pull between your local install and different environs like so:

grunt push_theme --target=dev

Enjoy responsibly.

And submit an issue to this repo if you're having trouble.

###Please refer to the grunt-wordpress-deploy docs for deployment syntax/instructions.

grunt-wp-deploy-boilerplate's People

Contributors

jambox avatar

Watchers

Juan Camilo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.