DEV Community

JoeStrout
JoeStrout

Posted on

Proper setup for a MiniScript GitHub repo

GitHub is a great place to store your projects on the web — it's free, it provides powerful version control and project-management features, and it is by far the most widely known code-sharing site on the planet.

So, hopefully you have a bunch of MiniScript-related GitHub repositories, or you will soon. Here are some important tips on how to configure those repos properly, to be a good citizen and benefit the MiniScript community.

1. Tag the project with miniscript and minimicro

The most important thing you should do for any MiniScript-related project is to tag it (in the "About" info) with miniscript. This will cause your project to appear under the miniscript topics list:
https://github.com/topics/miniscript

If your project is written for Mini Micro, you should also tag it with minimicro, thus adding it to https://github.com/topics/minimicro as well.

To add these tags, just click the little gear icon next to "About" on your project's home page.

Screen shot of

That brings up a dialog like this, where you can add or edit tags:

Edit dialog for the

2. Add a .gitattributes file

GitHub doesn't understand MiniScript. As a result, unless you explicitly tell it otherwise, it misidentifies MiniScript files as "MAXScript", resulting in a Languages panel on the repo home page like this:

Languages panel showing 97% MAXscript

However this is easily fixed! All you need to do is add a .gitattributes file containing this:

*.ms linguist-language=MiniScript
Enter fullscreen mode Exit fullscreen mode

GitHub still doesn't know what MiniScript is, so it won't actually include it in the count. If you have no other languages in your project, it will hide the Languages panel entirely; or if, as in this example, you have something else — maybe a shell script you use to pack up and upload your game — then it will show something like:

Languages panel showing 100% Shell script

But this is still better than counting MiniScript files as something else! And once we get MiniScript added to Linguist, your project will be properly counted.

Note that if you have an existing repo that needs this .gitattributes file, you can do it right from GitHub, using the "Add File" button:

Screen shot of

3. (Optional) Add a .gitignore file

Unlike some languages, MiniScript doesn't create any temp files (object code, debugging files, etc.) when you run it. So, you may not need a .gitignore file. However, if you happen to be developing on a Mac (or want to collaborate with people who do), then you might want a .gitignore file containing:

.DS_Store
Enter fullscreen mode Exit fullscreen mode

This is an invisible file used by the Mac file manager (aka Finder) to keep track of what UI state you left a directory in. It's not important and certainly shouldn't be included in your GitHub repo, so having this in a .gitignore file makes Git ignore it.

In many of my projects, I also have some local files that I use to pack up and deliver the project to itch.io. I want to ignore most of the tools related to that as well, so my .gitignore will also contain:

archive.zip
7z.so
libc7zip.dylib
butler
MiniMicro
Enter fullscreen mode Exit fullscreen mode

Feel free to use these things as needed; they're just a convenience, to keep Git from noticing files you don't want it to track.

How to check your projects

If you click on your name on GitHub, and then click on Repositories, it brings up a list of all your repos. Here's mine for example:

Screen shot of Joe's repos list

Note that for each repo, the tags are shown, as well as the languages. If you don't see any tags (or the tags are missing miniscript and minimicro as appropriate), go add them. If you see MAXscript as a language (to the left of the license and last-updated time), go add a .gitattributes file. When they all look correct, you're done!

Why tagging matters

Yes, tagging your projects makes it easier for people to find MiniScript or Mini Micro code. But more importantly, GitHub only wants to add a language when it has substantial use on GitHub. They need at least 200 unique users/projects with the miniscript tag before we can make a case for adding MiniScript. So, please tag your projects!

Top comments (0)