In this small guide you will find all the necessary elements if you want to start collaborating on the project.
Here are mentioned the variables and workflow that must be considered when
- Fix a bug
- Improve an existing feature
- Add a new feature
In case you want to contribute, you can do so by reporting a new issue from here
to begin following up on the request.
To prepare the EFDE development environment, see the following steps according to the corresponding role.
# Prepare environment
mkdir -p ~/Domains
cd $_
git clone https://github.com/mmaximo33/EFDE.git efdev
cd $_
ln -sfT $PWD/bin/efde.sh ~/bin/efdev
# Check the installation by running 'efdev' in your console
# Begin to work
git switch develop
git pull origin master
git checkout -b <issue-new-feature> # example 31-description-of-new-feature
git add <files>
git commit "feat/fix (environment): feature description" # See https://www.conventionalcommits.org/en/v1.0.0/
# Confirm that it is up to date with other updates
git rebase origin/develop
# Verify that there are no conflicts
git status
# If there are, resolve them, add the changes and commit.
# git add <files>
# git commit "fix (environment): resolved conflicts"
# git rebase --continue
# Upload your changes
git push origin <issue-new-feature> --force-with-lease
To have all developer features enabled, modify the bin/cfg.core
file generated after the first run
DEBUG="false" # Debug general (It is required for the rest of MODE)
DEBUG_CONFIG="false" # Debug load config
DEBUG_MODULE="false" # Debug load modules
DEBUG_SHORTCUTS="false" # Debug load shortcuts
DEBUG_I18N="false" # Debug load translations
DEBUG_MENU="false" # Debug load menu
Shows additional information for debugging actions | On each run, clean the bin/.tmp directory and transform the files individually |
![]() |
![]() |
If you want to add a new feature you must keep the following rules in mind
- Define type
- Service: (docker, mysql, phpmyadmin, mailhog, others)
- Implementation: frameworks, cms, others (symfony, laravel, magento, woordpress, prestashop, others)
- Inside
console/{Implementation | Service}
, create a directory named after your new implementation or service (example:myserv
)- In
console/service/myserv
- Create the directories
./tasks
- Create your files, the methods here must start with
_mod_.FUNCTION_NAME
- You can call other methods as appropriate to your location
common.tasks.menu.FUNCTION_NAME
- Create your files, the methods here must start with
./props
- Create your files, the properties here must start with
_mod_PROPERTY_NAME
- Important: It does not have the point in the middle like the methods
_mod_.
vs_mod_
- Important: It does not have the point in the middle like the methods
- Create your files, the properties here must start with
- In
If you want to add shortcuts to your new deployment, just add the file in console/service/myserv/props/shortcuts
The file must contain the following format, where each column represents a piece of data.
Caution
DO NOT CHANGE VARIABLE NAME _mod_ITEMS
#!/usr/bin/env bash
{
_mod_ITEMS=(
"shortcut, path.of.a.function, Description"
"myserv:test, myserv.tasks.file.function, This is a shortcut test"
)
}
- Translations must be incorporated into each implementation with the i18n directory
- The languages available so far are
- en_US (Default)
- es_ES
- pt_PT
- They must follow the following pattern
"text_en_us","text_translations"
Important
You cannot use characters like \ \"
- Load essential elements
- Load
bin/cfg.core
andbin/cfg.host
configuration - Load modules
- Build shortcuts
- Apply translations
- Load menu
Taking into account the installation carried out previously.
-
When executing in glogal symbolic link
~/bin/efdev -> ~/Domains/bin/efde.sh
-
Is loaded
console/init
- By default change the CORE
console/common/core
inbin/.tmp/common.core
(to work on the transformation) - It loops through all the directories within
./console
recursively until it finds a folder called../task
- At that moment the transformation of the files found in that implementation or service begins
./console/.../wordpress/{tasks | props | accessories}
- Renaming methods and variables according to the rules mentioned before
- Files: multiple files from
console/efde/tasks/menu
tobin/.tmp/efde.tasks.menu
console/efde/props/menu
tobin/.tmp/efde.props.menu
- Methods: from
_mod_.main
toefde.tasks.menu.main
- Variables: from
_mod_MAIN
toefde_prop_menu_MAIN
- Files: multiple files from
- Renaming methods and variables according to the rules mentioned before
- Generate the shortcuts
- Finds all files in
../props/shortcuts
locations and merges them into~/Domains/bin/.tmp/common.props.shortcuts
to improve speed on future runs
- Finds all files in
- Apply translations
- Translations apply only if
- The language set
bin/cfg.host HOST_I18N
is different from the defaulten_US
- If the variable MODE_DEBUG is true in
bin/cfg.host
- The language set
- It goes through all the files looking for text matches and replacing them with the established ones, when finished it restarts EFDE
- Translations apply only if
- By default change the CORE
-
Determines whether the launch directory in the
efdev
command console has a project created by it or not (search for$PATH_PROJECT/.efde/
)- Is TRUE, loads the implementation menu according to what is established in the
$PATH_PROJECT/.efde/.env
file variableEFDE_PROJECT_IMPLEMENTION
- Is FALSE, load the default menu to configure
efdev
or install implementations
- Is TRUE, loads the implementation menu according to what is established in the
git switch develop
git fetch origin <issue-new-feature>
git merge <issue-new-feature>
# Remember to update the docs CHANGELOG.md, README.md
git add CHANGELOG.md
git commit -m "fix (doc): update changelog"
git push origin develop --force-with-lease
# See https://semver.org/
git fetch --tags
git tag -a <major.minor.patch> -m "<major.minor.patch> comments"
# git tag -a 1.0.0 -m "1.0.0 comments"
git push origin <major.minor.patch>
# Create new pull request in github