From 91612b9fbff23c7014838b0bebda5bd21cd59c15 Mon Sep 17 00:00:00 2001 From: Roy Ho Date: Thu, 11 Nov 2021 13:26:39 -0800 Subject: [PATCH] Updated How to set up WooCommerce development environment (markdown) --- How-to-set-up-WooCommerce-development-environment.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/How-to-set-up-WooCommerce-development-environment.md b/How-to-set-up-WooCommerce-development-environment.md index 9307f98..b4c5486 100644 --- a/How-to-set-up-WooCommerce-development-environment.md +++ b/How-to-set-up-WooCommerce-development-environment.md @@ -20,6 +20,8 @@ Before starting, make sure you have the following software installed and working 1. [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) to clone the WooCommerce repository (or your fork of the WooCommerce repository). 2. [NVM](https://github.com/nvm-sh/nvm) to install Node.js and NPM. 3. [Composer](https://getcomposer.org/download/) to install PHP packages required by WooCommerce such as the `woocommerce-rest-api` and the `jetpack-autoloader`. It's also necessary to use the PHP CodeSniffer that ensures your code follows code standards. +4. Follow [instructions on nx.dev site](https://nx.dev/l/r/getting-started/nx-setup) to install Nx. +5. Follow [instructions on pnpm.io site](https://pnpm.io/installation) to install pnpm. ## Configure a local WordPress instance @@ -64,14 +66,14 @@ To install WooCommerce dependencies (this includes some functionality such as Gu $ cd ~/vagrant-local/www/wordpress-one/public_html/wp-content/plugins/woocommerce $ nvm install $ nvm use -$ npm install -$ composer install +$ pnpm install +$ pnpm nx composer-install woocommerce ``` The source code found on GitHub does not contain compiled CSS or Javascript. To generate those assets run the following command from the WooCommerce root directory: ``` -npm run build +pnpm nx build woocommerce ``` _Note: Depending on your PHP settings, you may encounter an out-of-memory error similar to the following..._ @@ -88,7 +90,7 @@ _If this happens, increase the `memory_limit` setting in your php.ini configurat To automatically rebuild the assets whenever a JS or SCSS file is modified run: ``` -npm run build-watch +pnpm nx build-watch woocommerce ``` ## IDE integrations