STEP-1 and 2 Creating Magento 2 Module
STEP-1
Let’s Create Empty Module Folder app/code/ScandiPWA/SocialShareGraphQl ScandiPWA is [VENDOR] module provider SocialShareGrpahQl [MODULE_NAME]
STEP-2
Now we going to create a blank Magento module and register it in Magento
  1. 1.
    For that let’s create an etc folder in app/code/ScandiPWA/SocailShareGraphQl <- feather in text <MODULE ROOT>
  2. 2.
    In <MODULE ROOT>/etc we need to create file module.xml with the following content
ScandiPWA/SocialShareGraphQl/etc/module.xml
1
<?xml version="1.0"?>
2
3
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
5
<module name="ScandiPWA_SocialShareGraphQl" />
6
</config>
Copied!
3. Create registration.php in <MODULE ROOT>
ScandiPWA/SocialShareGraphQl/registration.php
1
<?php
2
use Magento\Framework\Component\ComponentRegistrar;
3
4
ComponentRegistrar::register(ComponentRegistrar::MODULE,
5
'ScandiPWA_SocialShareGraphQl',
6
__DIR__);
Copied!
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 thenm set:up
Copy link