Thanks for taking the time to contribute to Snippet! ❤️
Snippet is made to be as community driven as possible, and to help this out, we need the CONTRIBUTING.md
file to set some ground rules.
On the Snippet GitHub page (link), there should be some buttons to the upper right. They should look similar to this:
Click on the Fork
button. It will make your own version of the repository, so you can make whatever changes you wish to make.
Once you have made your changes, look for the New Pull Request
button. Click it, confirm everything and your changes should be reviewed within the next 48 hours.
Testing your contribution to Snippet is simple, run the npm test
command.
If it exits with code 0
, it's all good to go. I suggest doing your own tests, because the test
library was not made to function with all programming languages and scripts included in the Snippet library.
If you don't have NPM
or NodeJS
installed, get them from the NodeJS Website, the first thing you should see on the web page is a download link, get the current version for your system.
To add a Snippet, open up your file browser and navigate to your Snippet installation path. Open up the snippets
folder, then select the folder with the language you want to create a snippet for.
If the language you are looking for doesn't exist, add the folder to the snippets
folder and call it the name of the said language. Also see Adding a Language for implementing it.
Create a file in that folder with the file extension of your language. Change it to your liking, then take a look at the Contributing section for some help with deploying your changes.
To add a language, make sure you have NodeJS
installed on your computer. If you don't, download it from the NodeJS Website, now let's get started.
Open up the terminal of your choice, and enter this command:
node addLanguage.js myAmazingLanguage .myAmazingExtensions .mAE
The syntax is built up like this:
node addLanguage.js [language name] [language file extensions (seperated by spaces)]
Good luck with your contributions, developers, I am looking forward to what you all will change on your own versions of Snippet!