Chapter 3: You call that an extension?
No, I haven't been up all night doing this. I fell asleep for a few hours. š
Success. You can use nothing but a Chromebook, Google Cloud Shell, Github, and Packagist to create and release a Flarum extension. I do not have an extension to show you because I went into this not to create a new extension, but to learn more. However, I did take @clarkwinkelmann's poke demo files and put them into the Cloud Shell, did the JavaScript transpile npm steps, got things into Github and Packagist, and installed in a Flarum.
It's working because I see the new poke permission settings in my admin which is part of the extension. But, I'm not seeing the poke button in the frontend. But, I'm sure I'll figure it out. For the purposes of this project, it actually does not matter that the extension is not fully working. All that matters is, as long as you somewhat know what you're doing, yes, you can create Flarum extensions in the cloud.
Here's a screenshot of the npm run dev
step, an important step, just to show that it does work.
Again as mentioned previously, you are looking at Google Cloud Shell. You've got your directory tree, your coding space, and the console at the bottom... and all of that gibberish you see is what happens after navigating to the main js/src folder and running npm install
and then npm run dev
(also see official extend documentation).
Thank you Clark for the video tutorials you have been putting out! That really inspired me to try this. Although I've created a few Flarum extensions already, they are the type of extension which does not require the transpilation steps, or anything too advanced. Clark's video tutorials thread.
A little more proof all this worked, for the most part, before I go:
See, "Reset wave count" ? That's part of Clark's poke extension demo/tutorial. I just changed poke to wave in the version I've been re-creating in Google Cloud Shell.
I will post here again if/when I finish tweaking Clark's poke extension just to fully wrap this saga up. But until then, now I know more about how Flarum extensions work, and Flarum extension development can be done in the cloud on a basic Chromebook. Thank you, good night, good morning, good day.