blanket is a modern and opinionated Wordpress starter theme. blanket assumes you're familiar with the following: Advanced Wordpress, ACF, non-jQuery DOM manipulation, NPM, Webpack, SASS.
Branch: master
Clone or download
Pull request Compare This branch is 45 commits ahead, 11 commits behind jonathanawesome:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
acf-json
app
src
templates
views
.babelrc
.eslintignore
.eslintrc
.gitignore
.stylelintignore
.stylelintrc
README.md
functions.php
index.php
package.json
screenshot.png
style.css
webpack.config.js
yarn.lock

README.md

blanket

blanket is a modern and opinionated Wordpress starter theme

Basics

blanket is a Wordpress starting-point theme forked from @jonathanawesome’s original. The theme provides modern javascript and styles tooling through Node and includes a setup for assets with cache-busting, hashed filenames. This setup comes with a CircleCI config for linting, a build-check, and deployment of a cleaned-up version of the theme to S3.

Setup

Be sure to place the repo inside the theme directory of your Wordpress install.

Install everything with:

yarn install

The bundle install command will be run first. You can always run it separately as well.

Deployment

This setup comes with a CircleCI config for linting, a build-check, and deployment of a cleaned-up version of the theme to S3.

Connect your repo to a CircleCI account.

Make sure the following environment variables are set:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

The script syncing with AWS will upload a clean theme by ignoring hidden files, /src, npm/yarn files, and the repo README.

Usage

In development, start the assets server with this command:

yarn start

Linting

Code staged for commits will automatically be linted using eslint and stylelint.

To lint the entire css/js codebase

yarn lint

To lint a codebase sub-section:

yarn lint:css
yarn lint:js

Build

Build cleans the dist directory and makes a fresh copy of all assets with hashed filenames using webpack’s contenthash and a manifest file. The getHashedAssetWithPath and getHashedAsset helpers in Wordpress use the manifest to display the correct filenames for a given asset.

yarn build

Clean up:

yarn clean