Skip to main content

Create a new module using the skeleton

Prerequisites

  • Local instance that is at least M2.4.6

Instructions

  • Create a new empty project, in https://git.econsor.net/magento/magento-2/module
    • Naming should match the intended module name in kebab case i.e. "product-transfer"
    • Should be fully empty so uncheck: "Initialize repository with a README"
  • Add protected branch setting for "release/*"
  • Add CI/CD Variables for "COMPOSER_CONFIG" and "COMPOSER_AUTH"
    • Can be copied from here
  • Create a new folder in your local instance for local composer packages
    • I.e. "packages/econsor"
  • Create a new folder for the module
    • Naming should match the same naming as the composer package, so "magento2-{MODULE NAME IN KEBAB CASE}"
  • Clone skeleton module repoistory in newly created empty directory and remove the .git dir
      git clone git@git.econsor.net:magento/magento-2/module/skeleton.git .
    rm -rf .git
  • Replace skeleton place holder information
    • registration.php - Module name
    • composer.json - Module name, description
      • Module name for composer package should be as follows: "{VENDOR}/magento2-{MODULE NAME IN KEBAB CASE}"
    • [TBA] README.md
  • Initialize module repository in folder
      git init --initial-branch=master
    git remote add origin {REPO URL}
    git add .
    git commit -m "Initial commit"
    git push --set-upstream origin master