DEV Community

Cover image for 5 Tools Every Open Source Software Must Use.
Yash
Yash

Posted on

5 Tools Every Open Source Software Must Use.

So you made an open source software but it has no systematic way of showing fancy test fails when someone makes a pull request or other amazing things some good open source software are able to accomplish. In this writeup I am going to cover a few tools to make your open source software awesome!

1. Testing

Popular Tool(s) - Mocha, Jest, Cypress etc.

Testing is really important; you don't want to make changes to your code and regret your app failing at production and that too on Friday.

If you're making a library or framework or any other tool then the importance of testing is a lot more than for other apps.

Basically, in a test you define what you expect a function to do, if the function misbehaves you immediately tell by seeing the test fail.

Check this awesome talk by Tomasz to learn more about tests.

2. Linting

Popular Tool(s) - ESlint etc.

ESLint checks the readability of the code and even formats it to make it more readable.

For example - someone might miss an indent randomly somewhere and if it gets to GitHub or any other place where you host your code then the indent results in loss of readability of code.

3. Code Coverage

Popular Tool(s) - Codecov, Istanbul etc.

If you have been in the dev community for a while you must have heard people say things like - "We have achieved 100% Test Coverage."

These tools check how much of your code is being tested. So if someone decides to delete a few tests because the tests are failing for their changes you immediately known as code coverage has suffered.

If used popular they will also warn about not meeting a targeted coverage for the software.

It is recommended to target for 100% test coverage.

4. Compilation and Postprocessing

Popular Tool(s) - Babel, Webpack, Uglify, etc.

You probably don't want your code to break on old machines and browsers. That's where tools like babel come in to play, Babel will compile your code in to old versions of JavaScript, for example, you wrote an arrow function, but old browsers do not support arrow functions. Babel will convert that arrow function to a regular function.

Uglify.js minifies your code by removing the extra spaces, comments and even shortening the variable names.

Extremely size efficient libraries like Preact rely heavily on uglifier and use very custom settings for the best optimization.

5. CI/CD

Popular Tool(s) - TravisCI, GitHub Actions etc.

Ever saw fancy test failing in a GitHub PR, these are features that a CI/CD tool will provide.
Awesome Tools like Travis allow you to Test and Deploy your application. So, whenever you push your code to the repo or someone create pull request, Travis CI will run the code and check if the tests are passing or not.

If the tests of a PR are failing then it will give an error right there in GitHub that the tests are failing.

On an ending note, there are many other popular must have in libraries but the 5 tools I have listed are the ones that I personally really like to have.

Thanks for reading this post.

About Me

I am a 17-year-old passionate web developer and I go by @yashguptaz on the internet. Be sure to direct message me on Twitter for any help you want.

Latest comments (0)