The way I manage my local file system when developing plugins is as follows. Note that I develop on a Mac in a standard environment (i.e. non-dockerized).
I have a folder in my home directory called “discourse”. This has the following subfolders:
discourse
discourse // the discourse codebase
plugins // discourse plugins (currently 68 plugins in here on my local)
scripts // scripts I use to manage discourse folders
themes // discourse themes
Folder management scripts
I use two simple scripts to change what plugins I’m using in development:
Yup, you just have to log in. And even better, VS Code automatically looks for and uses your .ssh config (which I set up with git bash when on Windows, on mac it’s native)
I use RubyMine which is powerful IDE for Ruby development by Jetbrains (which is a part of my student dev pack which I still have a subscription of).
I use an old 2012 MacBook Pro with an SSD and 10 gigs of ram. I use VSCode for my PHP/WordPress development and RubyMine for Discourse.
I save all the reusable code snippets to this open-source tool called CodeNotes.
I use a local setup of discourse for development and just today I bought an external Dell Monitor to be able to wrestle with so many discourse files without losing sanity.
I know about symlinks but I’m not used to them so I do all the file stuff with file manager or command line.
To make my plugin get auto-loaded by Discourse I have to create a symlink when the Docker container is built, I do this by manually editing one line in bin/docker/boot-dev:
basically you map your plugin as a Docker Volume to a subdir of /src/plugins, and it will be there in your Docker instance.
I use a Dell XPS15 with 2 external monitors when I’m at home. I probably don’t need 2, but it’s very handy to be able to put reference/documentation on one screen and text editor on the other. It’s also MUCH better for posture to be looking at the monitors rather than the laptop screen.
I save snippets inside my Clipboard Manager CopyQ, they are sync’d to text files on disk by CopyQ
I use Ngrok to demo stuff on the public internet to people, if I don’t want to set up a dedicated internet-facing server for it. It’s really useful for testing other random stuff like webhooks too, where you can’t necessarily have the entire stack on your local machine.
I’ve added a few more scripts by building upon these. One is add_discourse_plugin which simply adds a plugin without removing the existing ones. Another one is list-included-plugins.sh which lists the currently included plugins(this is the result of my laziness to use finder).
Other two are start.sh and purge-start.sh which start the server without and with removing tmp folder respectively.