Workshop for developing Open Source NPM packages.
-
This workshop is designed to be a hands-on experience for developers who want to learn how to develop and publish Open Source NPM packages.
-
The workshop is divided into multiple sections, each section will cover a specific topic.
Focuses on writing a simple add function and testing it using Vitest. Also, we will learn how to use the collaborative development tool, Git and GitHub. We talk about a Github Repository, Branches, and Merging. Along the way, we also discuss the importance of writing good commit messages. Issues and Pull Requests are also discussed.
This section is focussed on Git Hooks using Husky. We will learn how to use Husky to run tests before committing code. Husky makes it easy to use Git Hooks in your project.
This section is focussed on Continuous Integration using GitHub Actions. We will learn how to use GitHub Actions to run tests on every push to the repository and also on every Pull Request.
This section is focussed on using ESLint and Prettier. We will learn how to use ESLint to enforce code quality and Prettier to format the code. We also learn how to use Husky to run ESLint and Prettier on every commit. We also discuss about lint-staged and how it can be used to run ESLint and Prettier on staged files.
This section is focussed on writing good commit messages. We will learn how to use Conventional Commits to write commit messages. We will also learn how to use Commitlint to enforce Conventional Commits. Finally we run commitlint in CI.
This section is focussed on using Rollup as a bundler. We will learn how to use Rollup to bundle our code. We will also learn how to use Terser to minify the code. Finally we hook Rollup and Terser to our CI.
This section is focussed on writing documentation for our package. We already wrote some code documentation (using JSdoc) in the previous sections. In this section, we will learn how to write a README.md file for our package. We will also learn how to use GitHub Pages to host our documentation. We also discuss about templates for Pull Requests and Issues. Finally we end this section with a brief discussion on CHANGELOG.md and licensing our code.
- Node.js
- NPM