Theme Configuration

WP Rig has many configuration options. All the configuration is located in the config directory.

Default configuration options are defined in the config/config.default.json file. Default configuration values can be overridden in the config/config.json file. config/themeConfig.js is used by gulp and simply merges the two configuration files, do not edit this file.

It is recommended that you change slug, name, author and PHPNamepace. A full, commented configuration is below. Note that you will need to remove all comments from the actual files as comments are not valid JSON.

{
  "theme": {
    // The machine-friendly slug for the theme
    "slug": "wp-rig",
    // The human-readable name of the theme
    "name": "WP Rig",
    // The author of the theme
    "author": "The WP Rig Contributors",
    // The namespace used in PHP files
    "PHPNamespace": "WP_Rig\\WP_Rig"
  },
  "dev": {
    "browserSync": {
      // Whether to live reload the BrowserSync server when source files are changed
      "live": true,
      // The URL to proxy with BrowserSync. This should be the full URl to your local WordPress installation.The port at the end is optional.
      "proxyURL": "wprig.test:8888",
      // The port to use for the BrowserSync server on localhost.
      "bypassPort": "8181",
      // Whether to serve HTTPS from the BrowserSync server
      "https": false
    },
    "debug": {
      // To debug CSS or not. If true, CSS will not be minified.
      "styles": false,
      // To debug JS or not. If true, JS will not be minified.
      "scripts": false,
      // Whether to test PHP files for WordPress coding standards. Disable this if you already do so in your code editor.
      "phpcs": true
    },
    "styles": {
      // Whether to leave CSS variables unproccsed
      "preserveCSSVars": false
    }
  },
  "export": {
    // Whether to create a .zip file when building the production theme
    "compress": true
  }
}

Below is an example config/config.json with some, but not all, default configuration options overridden. In this example naming conventions are defined, the BrowserSync proxy URL is changed, BrowserSync HTTPS is turned on, and no .zip file is made when the production theme is created.

{
  "theme": {
    "slug": "ataylorme",
    "name": "ataylorme",
    "author": "Andrew Taylor",
    "PHPNamespace": "ataylorme\\theme"
  },
  "dev": {
    "browserSync": {
      "proxyURL": "https://ataylormewordpress.lndo.site/",
      "https": true
    }
  },
  "export": {
    "compress": false
  }
}