STEP-1 Creating Magento 2 Module

  1. Let’s Create Empty Module Folder app/code/ScandiPWA/Version ScandiPWA is [VENDOR]

    1. Let’s Create Empty Module Folder app/code/ScandiPWA/Version ScandiPWA is [VENDOR] module provider Version [MODULE]

    2. In [MODULE] create file registration.php

app/code/ScandiPWA/Version/registration.php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
   \Magento\Framework\Component\ComponentRegistrar::MODULE,
   'ScandiPWA_Version',
   __DIR__
);

3. Create etc folder in [MODULE] and module.xml in it.

app/code/ScandiPWA/Version/etc/module.xml
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
   <module name="ScandiPWA_Version" />
</config>

4. Now we need to run setup:upgrade and find our module in output if you are running CMA setup open console in <PROJECT ROOT> run npm run cli and then m set:upyou should be able to find newly created module in output

Useful Materials CMA Enter application CLI Create a New Module bin/magento (Open Source) Magento CLI

Last updated