
Explore how to structure, test, and publish your first open source JavaScript library with tools like Jest, Prettier, ESLint, Husky, Rollup, and TypeScript.
Prepare codebase for publishing an open-source JavaScript library by refactoring into a class, using vanilla JavaScript, and adding tests to verify password generation with Node and npm.
Learn to test your JavaScript code with Jest, focusing on unit tests and coverage. Set up with npm install -D jest, create a test folder and run npx jest.
Bundle your code using Rollup to combine JavaScript modules into a single, runnable library, exploring CommonJS, AMD, UMD, and ESM formats, tree shaking, and code splitting.
Set up git hooks with Husky to enforce quality in a local repo, configure gitignore, and ensure tests pass before commits, paving the way for lint-staged workflows.
Install and configure lint-staged to run eslint on JavaScript and prettier on staged files. Block commits to main, work on dev branch, and show linting and formatting feedback.
Generate and include declaration files for a TypeScript open-source library by configuring tsconfig, using rollup-plugin-dts, and updating package.json to publish lib/types.d.ts.
Wraps up by showcasing ci/cd with GitHub actions across OS and Node versions, adds tests, linting, bundling, issue templates, pre-push hook, updated docs, tsconfig, and minified bundle via Rollup.
Explore how AI impacts development and learning, balancing powerful AI tools with building a solid foundation, solving problems, and continuing to code as you publish an open-source JavaScript library.
Hey there, fellow developer!
At some point in your journey, you've probably built something cool using tools crafted by other devs. Whether those tools were open-source or not, their creators made the decision to share them with the world—pretty awesome, right? Well, now it might be your turn to do the same! Whether you're looking to contribute to open source, level up your skills, or just satisfy your curiosity about how JavaScript libraries are built and shared, you're in the right place.
This course is designed for Junior to Mid-level developers who are ready to put their work out there (which, by the way, takes real courage—so kudos to you!). My goal is to help you do it the right way, while avoiding common pitfalls that frustrate even experienced developers (yep, been there myself!).
Since the JavaScript ecosystem is packed with tools, I’ve carefully selected the essentials to keep this course focused and practical. You’ll learn how to:
build a Node.js library and publish it on npm;
use Rollup for bundling your library;
work with TypeScript to write maintainable code;
set up key tools like Jest (for testing), Prettier (for formatting), and ESLint (for linting).
Now, just a heads-up—this isn't a JavaScript fundamentals course. Instead, think of it as your roadmap to launching an open-source project and getting your work into the hands of other developers.
This course was designed with care and built with love, so I hope it makes your journey into open source an exciting and rewarding experience. Thanks for considering this course, and I can't wait to see what you create!