Chapter 13. Creating JavaScript Packages

So far we have built up a web application, making use of various npm packages along the way. These packages include libraries such as Express and command-line tools such as Gulp. Now we'll look at how to go about creating packages of our own.

In this chapter we will:

  • Explore the different module systems available for JavaScript
  • Create our own JavaScript library
  • Write JavaScript that can run on both the client and server-side
  • Create a command-line tool in JavaScript
  • Release a new npm package
  • Use Node.js modules in the browser environment

Note

The code examples in this chapter are independent of everything we've done so far.

Writing universal modules

We have already written many of our own modules as part of our application. ...

Get Learning Node.js for .NET Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.