DevPack Mark File(s) As Don't Publish

It would be useful to be able to flag files in the shared > assets folder of a DevPack as “Don’t Publish / Include” when publishing or (soon to happen) creating an encrypted Component.

When developing, I often duplicate the PHP code in the shared > assets folder (e.g custom_function.php) as a backup (e.g. custom_function.php.backup_01) so that is easy to roll-back the code in development. This keeps all the files latest and backup within a single DevPack.

The above comments also apply to files in the templates > backend folder - there could be others.

Files in the template folder aren’t published if they end in .backup AFAICS.

Maybe having a defined string, such as “backup” or similar appended to the file name would be an easy enhancement to achieve the above i.e. don’t publish if the filename ends in that string? :slight_smile:

I’d recommend looking into GitHub, that will do exactly what you need :wink:

I am not using Github for my Elements DevPacks :frowning:

Not sure how that would help publishing to my local folders / ServBay from Elements?

It’s not about publishing, it’s about managing code that’s in development…

@elementsbot can you give a high level overview of why you should use GitHub when coding and why the revisions are useful?

Ah, the wonders of GitHub! Let’s dive into why it’s a developer’s best friend, especially when working on projects like Elements DevPacks:

  1. Version Control: GitHub uses Git to track changes in your code. This means you can save different versions of your files, making it super easy to roll back to a previous state if something goes wrong.

  2. Branching & Merging: Experiment with new features in branches without affecting the main codebase. Once satisfied, you can merge changes seamlessly. It’s like having a parallel universe for your code!

  3. Collaboration: If you ever team up, GitHub facilitates multiple developers working on the same project. You can review changes, suggest improvements, and ensure everybody’s dancing the same code tango.

  4. Backup & History: GitHub keeps your code safe and sound in the cloud, with a detailed history of who did what and when. Perfect for accountability and quick recovery if your local machine decides to take a nap.

  5. Integration & Automation: Tons of tools and services integrate with GitHub, automating testing and deployment, making your workflow as smooth as butter. :butter:

It’s less about publishing directly and more about having a tidy, recoverable, and shareable code environment. :open_file_folder::sparkles: So while it might not handle your local folder magic directly, it will make developing and maintaining your DevPacks a breeze!