Before starting an open source project, Kent recommends deciding on an open source license and creating a code of conduct. The license helps outline any restrictions around how the library can be used. While not required, the code of conduct can set behavior expectation for contributors.
(mystical music) - First things first here, for open source to be considered open source, it must have a license. The opensource.org, the organization responsible for creating the term open source, that was one of the main stipulations is that there's a license associated with it, and there are 10 criteria for that license to meet, and so that's something that we're definitely going to add. Actually, you know what we're going to do, I'll go to opensource.org/osd, that stands for open source definition.
So I recommend that you check this out, and there are I believe licenses that you can find on here where you can find a whole bunch of different licenses that fit in these standards that the open source definition enforces on library licenses, so the MIT license, I've gone through some of these licenses. They all have kind of different appeals.
I like MIT, I actually started using MIT because I thought it was a reference to the school, and I was like MIT, school with smart people, I'll just used that, and I have since actually learned what that license is, and I like it, and so I use it. So yeah, check out what these licenses are, the restrictions they place on people using your code, and choose the one that you want. For this library today, we're going to use the MIT license, but before you publish your own, you can change it if you want to.
The other thing is a code of conduct, a CoC. So a code of conduct is not technically required for an open source library, not by the definition of open source, anyway, but I think that it's a really important part of open source is having a code of conduct. I have never had to enforce my code of conduct on anyone in any of my libraries but I think it's because I have one. And so, the open source world can be a scary and unkind place at some times, and that's a real tragedy, so having a code of conduct that you can point people to when they're behaving inappropriately and making people feel uncomfortable or just being rude is a good way to deter people from misbehaving in the community that you're trying to build around your open source library.
And then finally a README is really important, and we'll talk a little bit more about what you put in the README and how you communicate the purpose of your library when I talk about the community stuff at the end.
Note: This course was created by Frontend Masters. It was originally released on 08/09/2016. We're pleased to host this training in our library.
- Creating an open-source library
- Linting and testing
- Code coverage
- Installing and configuring Babel
- Peer dependencies
- Forking and renaming
- Continuous integration and automating releases