Git Product home page Git Product logo

grunt-wp-scratch-child's Introduction

grunt-wp-scratch

Create a WordPress child theme for Scratch with grunt-init.

Installation

If you haven't already done so, install grunt-init.

Once grunt-init is installed, place this template in your ~/.grunt-init/ directory. It's recommended that you use git to clone this template into that directory, as follows:

Linux/Mac Users

git clone [email protected]:mrdink/grunt-wp-scratch.git ~/.grunt-init/wp-scratch-child

Windows Users

git clone [email protected]:mrdink/grunt-wp-scratch.git %USERPROFILE%/.grunt-init/wp-scratch-child

Usage

At the command-line, cd into an empty directory, run this command and follow the prompts.

grunt-init wp-scratch-child

Note that this template will generate files in the current directory, so be sure to change to a new directory first if you don't want to overwrite existing files.

Development

Enable "Live Reload" under Advanced in the theme customizer to turn on livereload.js for development with grunt.

Production

After running grunt prod enable "Use minified assets" to use production files.

Install Grunt and Bower

Unfamiliar with npm? Don't have node installed? Download and install node.js before proceeding.

From the command line:

  1. Install grunt-cli and bower globally with npm install -g grunt-cli bower.
  2. Navigate to the theme directory, then run npm install. npm will look at package.json and automatically install the necessary dependencies. Also run bower install, which installs front-end packages defined in bower.json.

When completed, you'll be able to run the various Grunt commands provided from the command line.

Available Grunt commands

  • grunt dev — Compile Sass to CSS, concatenate and validate JS
  • grunt watch — Compile assets when file changes are made
  • grunt prod — Create minified assets that are used on non-development environments
  • grunt package — Runs all tasks, copies all files excluding dev files, and compresses into a zip file

Credit

Forked from grunt-wp-theme by 10up.

Icon created by iconsmind.com from the Noun Project

grunt-wp-scratch-child's People

Watchers

 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.