• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Github and XF add-on

Dadparvar

Well-known member
#1
Not a professional GitHub user, and Never used GitHub for this kind of structure of a project, and now I want to start using GitHub for my XF add-ons. I have a small question about it.

All my add-ons have this structure:
  • js
    • dadparvar
      • add-on name
  • library
    • dadparvar
      • add-on name
  • style
    • default
      • dadparvar
        • add-on name

As I know so far, the only way for me is to manually upload the new version of files in the repository in GitHub, whenever I update the add-on in localhost. Because js library and style files of each add-on are in different places and not foldered next to each other inside 1 single folder.

Am I right? or there is a way to define for the GitHub's desktop app to know which folders are for the GitHub project?

for example, this is a project in my git: https://github.com/Dadparvar/xf1ctaftlayouts
for this add-on: https://xenforo.com/community/resources/ha-cta-ft-layouts.5209/
(you know how is its structure in my local) now how to define the repo in my desktop git app so that I easily be able to commit push pull and ... without manual copy-pasting?

Thanks in advance
 

Arty

Well-known member
#2
If you are using OSX, you can use symlinks. Create a separate directory for your add-on, do all development there. On your forum instead of copying add-on files create symlinks to your add-on's directories. For example:

Development directory:

/dev
/dev/js/dadparvar/addon-name/
/dev/library/dadparvar/addon-name/
/dev/style/default/dadparvar/addon-name/

Forum:

/forum
/forum/js/dadparvar/addon-name -> symlink to /dev/js/dadparvar/addon-name
/forum/library/dadparvar/addon-name -> symlink to /dev/library/dadparvar/addon-name
/forum/style/default/dadparvar/addon-name/ -> symlink to /dev/style/default/dadparvar/addon-name/

Not sure if that can be done on Windows because I don't use Windows for more than testing with IE.