Coder Social home page Coder Social logo

lego-brick-moc-theme's Introduction

wordpress-theme-developer

Starter for developing WordPress themes using the gulp task runner and docker to serve WordPress and your theme without the need for another webserver (No MAMP/XAMP/LAMP). Keep your projects isolated and your system clean!

Features: SCSS processing, code linting, sourcemaps, minification.

The HTML5 Blank WordPress theme is included but may be replaced with your own starter theme. This project also works well for developing child themes.

Based on wordpress-gulp-starter-kit

Setup

Instructions below assume you are using yarn as your package manager. All yarn commands may be substituted with npm commands if you prefer.

1. Fork and clone this repository

  • Fork this repository by clicking the Fork button at the top of this page.
  • Clone your fork to your local machine: git clone https://github.com/YOUR-USERNAME/YOUR-FORKED-REPOSITORY
  • cd YOUR-FORKED-REPOSITORY

2. Install dependencies

  • Install yarn
  • Install Docker: Mac, Win, Ubuntu
  • Install gulp: yarn global add gulp
  • Install project dependencies: yarn install

3. Configuration

  • Add your settings to gulpconfig.js. At the minimum, change the project name.
  • Add your theme details to src/scss/_config.scss. (If you are building a child theme, set theme-template to the parent theme name)

4. WordPress Setup

  • Run your project: gulp dev
  • Follow the WordPress setup instructions in the opened browser window (You may have to refresh the window manually if it times out to give the docker image time to be ready).
  • Activate your theme from WordPress admin panel

Usage

Development

Running gulp dev will serve your project and open it in a browser. Your theme files live in /src. As you make changes to your theme, they will be automatically rebuilt and displayed in the browser.

Distribution

Running gulp dist will build your theme (including image minification with imagemin) and create a zip for release in the dist folder.

Troubleshooting

Stopping the dev task and/or docker instance

Sometimes the gulp dev task will not completely stop. Kill your terminal window then run docker-compose down in a new one.

node-sass

If you get an error similar to Error: ENOENT: no such file or directory, scandir '/wordpress-theme-developer/node_modules/node-sass/vendor' run npm rebuild node-sass to rebuild node-sass and try again. See this issue for more info.

lego-brick-moc-theme'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.