Updated How to set up WooCommerce development environment (markdown)
parent
df50d71060
commit
91612b9fbf
|
@ -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).
|
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.
|
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.
|
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
|
## 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
|
$ cd ~/vagrant-local/www/wordpress-one/public_html/wp-content/plugins/woocommerce
|
||||||
$ nvm install
|
$ nvm install
|
||||||
$ nvm use
|
$ nvm use
|
||||||
$ npm install
|
$ pnpm install
|
||||||
$ composer 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:
|
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..._
|
_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:
|
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
|
## IDE integrations
|
||||||
|
|
Loading…
Reference in New Issue