manifest and language is working so far

This commit is contained in:
2023-05-31 12:25:05 -07:00
parent 2e56d220d3
commit 63183262d4
6 changed files with 121 additions and 43 deletions

View File

@@ -0,0 +1,8 @@
#!/bin/bash
cat <<EOM > admin/language/en-GB/en-GB.com_${name}.ini
; com_${name}
COM_${name^^}_DESCRIPTION="Placeholder description, edit in language file"
EOM

View File

@@ -16,54 +16,28 @@ cat <<EOM > ${name}.xml
<?xml version="1.0" encoding="UTF-8"?>
<extension type="component" method="upgrade">
<name>com_${name}</name>
<!-- The following elements are optional and free of formatting conttraints -->
<creationDate>${current_date}</creationDate>
<author>${JOOMLA_USER}</author>
<authorEmail>${EMAIL}</authorEmail>
<authorUrl>https://www.example.com/</authorUrl>
<copyright>Copyright (C) 2023 ${JOOMLA_USER}, All rights reserved.</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<!-- The version string is recorded in the components table -->
<version>0.0.1</version>
<!-- The description is optional and defaults to the name -->
<description>COM_${name}_XML_DESCRIPTION</description>
<namespace path="src">J4xdemos\Component\${name#com_}</namespace>
<description>COM_${name^^}_DESCRIPTION</description>
<install> <!-- Runs on install -->
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.sql</file>
</sql>
</install>
<uninstall> <!-- Runs on uninstall -->
<sql>
<file driver="mysql" charset="utf8">sql/uninstall.mysql.sql</file>
</sql>
</uninstall>
<!-- Site Main File Copy Section -->
<!-- Note the folder attribute: This attribute describes the folder
to copy FROM in the package to install therefore files copied
in this section are copied from /site/ in the package -->
<files folder="site">
<folder>forms</folder>
<folder>language</folder>
<folder>src</folder>
<folder>tmpl</folder>
</files>
<namespace path="src">harvst\Component\com_${name}</namespace>
<administration>
<!-- The link that will appear in the Admin panel's "Components" menu -->
<menu link="index.php?option=com_${name}">${name}</menu>
<files folder="admin">
<file>access.xml</file>
<file>config.xml</file>
<folder>forms</folder>
<folder>language</folder>
<folder>services</folder>
<folder>sql</folder>
<folder>src</folder>
<folder>tmpl</folder>
</files>
<menu img="class:default" link="option=com_mywalks">com_mywalks</menu>
</administration>
</extension>
EOM

View File

@@ -7,7 +7,7 @@ script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
# ENV File
#################################################################################
# Import variables from .env file
if [ -f "$script_dir/.env" ]; then
if [ -f "$script_dir/../.env" ]; then
read -p "Found .env file at '$script_dir/.env'. Press Enter to use it, or enter a different file path: " env_file
if [ -z "$env_file" ]; then
env_file="$script_dir/.env"
@@ -55,14 +55,17 @@ mkdir -p "$component_dir"
# Create the main component files
cd "$component_dir" || exit
mkdir -p site admin
mkdir -p site
mkdir -p admin/language/en-GB
# Source the files for generating component files
source "$script_dir/component_parts/manifest.sh"
source "$script_dir/component_parts/language.sh"
# source "$script_dir/component_parts/admin_controller.sh"
# source "$script_dir/component_parts/site_controller.sh"
# source "$script_dir/component_parts/site_controller_base.sh"
# source "$script_dir/component_parts/admin_controller_base.sh"
source "$script_dir/component_parts/manifest.sh"
echo "Component framework generated successfully!"
echo "You should manually edit the manifest file before checkin"

View File

@@ -24,6 +24,4 @@ rm -rf bin/inc_new_project
rm -rf bin/new_project.sh
rm -rf bin/setup_joomla_installer.sh
# Git
git add .
git commit -m"ran finalize"
echo "Now check the results and commit them to Git"