Skip to content

How to set up a Germanized development environment

Dennis Nissle edited this page Sep 24, 2019 · 5 revisions

This page will guide you through the process of setting up Germanized for WooCommerce development environment on your local machine. It should work on Linux, macOS, or Windows 10 with the Linux Subsystem.

Pre-requisites

Before starting, make sure you have the following software installed and working on your machine:

  • Git to clone the Germanized repository (or your fork of the Germanized repository).
  • NPM to install Node packages used to build assets and other tasks.
  • Composer to install PHP packages required by Germanized such as the woocommerce-trusted-shops and the jetpack-autoloader. It's also necessary to use the PHP CodeSniffer that ensures your code follows code standards.

Local WordPress instance

You may setup your WordPress instance by following the VVV tutorial from the WooCommerce development set up tutorial.

Clone Germanized repository

To install Germanized on your WordPress installation, you need to decide whether you will clone the Germanized repository directly or your Germanized fork. If you plan to contribute to Germanized code base, it is recommended that you clone your fork. If needed, see this GitHub document on how to create a fork.

In your terminal:

  1. Go to the WordPress plugins directory:
  • $ cd ~/vagrant-local/www/wordpress-one/public_html/wp-content/plugins/
  1. Clone the repository:
  • If cloning WooCommerce repository:

  • $ git clone [email protected]:vendidero/woocommerce-germanized.git

  • If cloning your own fork replace USER_NAME with your GitHub username:

  • $ git clone [email protected]:USER_NAME/woocommerce-germanized.git

Install dependencies and generate assets

To install Germanized dependencies (this includes some functionality such as WooCommerce Trusted Shops that are developed as separate projects and Grunt that is used to generated minified versions of the SCSS and JS files):

$ cd ~/vagrant-local/www/wordpress-one/public_html/wp-content/plugins/woocommerce-germanized
$ npm install
$ composer install

To automatically rebuild the assets whenever a JS or SCSS file is modified run:

npm run build-watch