A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
Go to file
jonathansadowski 4ec3bef590
Update the changelog.txt and the stable tag in readme.txt for 6.6.0 (#33419)
2022-06-14 14:14:27 -05:00
.github Migrate From Nx to Turborepo (#33079) 2022-06-09 14:40:07 -07:00
.husky Migrate From Nx to Turborepo (#33079) 2022-06-09 14:40:07 -07:00
.vscode tsconfig modifications 2022-03-29 16:08:07 +08:00
bin Remove post-merge.sh 2022-04-06 17:31:32 +08:00
packages Adding context property to tasklist tracks event, introducing LayoutContext (#33287) 2022-06-14 11:31:50 -07:00
plugins Update the changelog.txt and the stable tag in readme.txt for 6.6.0 (#33419) 2022-06-14 14:14:27 -05:00
tools Update changelogger validation to work with turborepo (#33388) 2022-06-10 15:23:14 -05:00
.codecov.yml chore(ci): add informational Codecov status checks (#32675) 2022-04-26 10:20:59 +12:00
.editorconfig JS formatting files 2021-10-19 10:35:46 +13:00
.eslintignore JS formatting files 2021-10-19 10:35:46 +13:00
.eslintrc.js Designate root level eslint config 2021-12-13 08:13:40 -08:00
.gitignore Migrate From Nx to Turborepo (#33079) 2022-06-09 14:40:07 -07:00
.nvmrc Update package and node version 2021-12-15 07:08:37 -08:00
.prettierrc.js JS formatting files 2021-10-19 10:35:46 +13:00
.stylelintrc Deprecate stylelint-config-wordpress with current package 2021-12-14 09:14:54 -08:00
CODE_OF_CONDUCT.md Fixed a typo 2017-06-19 16:22:40 -03:00
DEVELOPMENT.md Migrate From Nx to Turborepo (#33079) 2022-06-09 14:40:07 -07:00
README.md Migrate From Nx to Turborepo (#33079) 2022-06-09 14:40:07 -07:00
SECURITY.md Removed the reference to WP mobile apps. 2020-10-02 11:51:35 +02:00
changelog.txt Update the changelog.txt and the stable tag in readme.txt for 6.6.0 (#33419) 2022-06-14 14:14:27 -05:00
package.json Migrate From Nx to Turborepo (#33079) 2022-06-09 14:40:07 -07:00
phpcs.xml Add phpcs ignore rules 2022-04-13 16:32:57 -07:00
pnpm-lock.yaml WooCommerce Plugin: Update Webpack to 5.x (#33354) 2022-06-13 09:09:23 +12:00
pnpm-workspace.yaml Migrate From Nx to Turborepo (#33079) 2022-06-09 14:40:07 -07:00
renovate.json Converted Spaces To Tabs In JSON 2022-05-10 13:31:01 -07:00
tsconfig.base.json Removed `@woocommerce/notices` Internal Prefix (#33283) 2022-06-03 16:05:26 -07:00
turbo.json Migrate From Nx to Turborepo (#33079) 2022-06-09 14:40:07 -07:00

README.md

WooCommerce

Welcome to the WooCommerce Monorepo on GitHub. Here you can find all of the packages, plugins, and tools used in the development of the core WooCommerce plugin as well as WooCommerce extensions. You can browse the source, look at open issues, contribute code, and keep tracking of ongoing development.

We recommend all developers to follow the WooCommerce development blog to stay up to date about everything happening in the project. You can also follow @DevelopWC on Twitter for the latest development updates.

Repository Structure

  • Plugins: Our repository contains plugins that relate to or otherwise aid in the development of WooCommerce.
    • WooCommerce Core: The core WooCommerce plugin is available in the plugins directory.
  • Packages: Contained within the packages directory are all of the PHP and JavaScript provided for the community. Some of these are internal dependencies and are marked with an internal- prefix.
  • Tools: We also have a growing number of tools within our repository. Many of these are intended to be utilities and scripts for use in the monorepo, but, this directory may also contain external tools.

Getting Started

To get up and running within the WooCommerce Monorepo, you will need to make sure that you have installed all of the prerequisites.

Prerequisites

  • NVM: While you can always install Node through other means, we recommend using NVM to ensure you're aligned with the version used by our development teams. Our repository contains an .nvmrc file which helps ensure you are using the correct version of Node.
  • PNPM: Our repository utilizes PNPM to manage project dependencies and run various scripts involved in building and testing projects.
  • PHP 7.2+: WooCommerce Core currently features a minimum PHP version of 7.2. While you don't need to use it to run a local development environment, you will need it to utilize Composer.
  • Composer: We use Composer to manage all of the dependencies for PHP packages and plugins.

Once you've installed all of the prerequisites, you can run the following commands.

# Ensure that you're using the correct version of Node
nvm use
# Install all of the NPM and Composer dependencies within the Monorepo
pnpm install

Building, Linting, and Testing

Our repository uses Turborepo for running build, lint, test, and e2e commands. This tool ensures that all dependencies of a package, plugin, or tool are prepared before running a command. It also provides caching for command outputs in order to ensure that work is not performed unnecessarily.

Without any additional flags, running a command will execute it against every project in the monorepo. For example, pnpm exec turbo run build will build all of the projects within the monorepo. pnpm exec turbo run test will run unit tests for all of the projects within the monorepo.

This behavior can be desireable, as the cache should ensure anything that has not changed is not rebuilt. There are times, however, that you may want to explicitly run a command against a specific project.

This can be done using the --filter flag. For example, running pnpm exec turbo run build --filter=woocommerce will build the WooCommerce plugin, as well as all of the dependencies required for the plugin to function.

The --filter syntax also supports paths, such as --filter='./plugins/**' to build all of the plugins in the monorepo. You can read more about the filtering syntax in Turborepo's documentation.

Project-Specific Commands

Outside of the above turbo commands, there may be times where you want to run a command on a specific project. This can also be done using the --filter syntax, however, you will run these commands using pnpm. For example, pnpm postinstall --filter=woocommerce will run the "postinstall" script from plugins/woocommerce/package.json.

Development Environments

Our repository makes use of the @wordpress/env package for providing development environments out-of-the-box. Once you have installed the package and its related dependencies, you should be able to run wp-env start in any of the plugins/ folders. This will start a development environment and provide you with a URL to begin testing code using.

Reporting Security Issues

To disclose a security issue to our team, please submit a report via HackerOne here.

Support

This repository is not suitable for support. Please don't use our issue tracker for support requests, but for core WooCommerce issues only. Support can take place through the appropriate channels:

Support requests in issues on this repository will be closed on sight.