Coder Social home page Coder Social logo

magento2-pwa's Introduction

PWA Metapackage for Magento Open Source Extensions

Welcome to PWA metapackage for Magento Open Source extensions. As a metapackage for Magento Open Source, this repo enables PWA extension developers to add any additional Magento Open Source features they need to support their PWA modules.

Current Modules

Development setup

To setup and develop your PWA extension modules locally, use the following instructions:

Installation as a git-based composer package

  1. Clone and/or navigate to your magento2 git repository and check out the latest develop branch, e.g. 2.4-develop. You may also check out and use any 2.4 release tags.

    git clone [email protected]:magento/magento2.git
    cd magento2
  2. Create an ext directory within the root of your magento2 project:

    mkdir ext
  3. Clone the magento2-pwa repository into your vendor directory name:

    git clone [email protected]:magento-commerce/magento2-pwa.git ext/magento/magento2-pwa
  4. Update the magento2/composer.json settings to create a better development workflow for your extension modules:

    • Update the minimum-stability for packages to dev. This allows for the installation of development modules:

      composer config minimum-stability dev
    • To work with stable packages, ensure that the prefer-stable property is true. This property should already be included in the composer.json file, right above the minimum-stability setting.

    • Configure composer to find new extension modules. The following command configures composer to treat any extension code inside the ext directory as a package and creates a symlink to the vendor directory:

      composer config repositories.ext path "./ext/*/*/*"
  5. Install the pwa metapackage:

    composer require magento/pwa

At this point, you should see symlinks for all the pwa modules inside the vendor directory. These symlinks allow you to:

  • Run a Magento installation with additional modules.
  • Develop locally using the standard git workflow.

You may need to ensure that there are no Magento_PWA* modules listed as enabled when you run bin/magento module:status. If there are, follow the docs on how to enable modules.

Setting up the Git workflow

To improve the developer experience even further, you can add these configurations as well:

  1. Exclude all the ext directories in the project's .git configuration:

    echo ext >> ./.git/info/exclude
  2. Skip your project's root directory composer.\* files to avoid committing them by mistake:

    git update-index --skip-worktree composer.json
    git update-index --skip-worktree composer.lock

    NOTE: You can reverse this operation anytime as needed:

    git update-index --no-skip-worktree composer.json
    git update-index --no-skip-worktree composer.lock

Cloud deployment extension installation

  1. Add https://repo.magento.com as a composer repository by adding the following to your cloud instances composer.json file.

    "repositories": {
        "repo": {
            "type": "composer",
            "url": "https://repo.magento.com"
        }
    },
  2. Require in magento/magento2-pwa extension by adding the following to your cloud instances composer.json file.

    "require": {
        "magento/magento2-pwa": "0.0.1"
    },
  3. Ensure your auth.json file has valid credential for repo.magento.com.

  4. Run composer update to update your composer.lock file.

  5. Push the changes and deploy your cloud instance.

magento2-pwa's People

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.