

mkdir once & cd once npm init -y & npm i typescript npm i -D See the official docs for best practices on naming conventions. The name we give to this folder will also be the name we publish our package to. Setting up a new projectįirst, we can create a new directory and initialize Node with TypeScript as a dependency. However if this is new to you, it may prove more beneficial to test this concept in a clean directory for the sake of getting familiar. e.g npm install can just as easily configure an existing project. The idea here is to be able to install and use our own npm package under the scope of your npm username. Let’s take a look at how we can go about adding a scoped package to NPM using Node.js and TypeScript.

For many developers, especially those coming from bootcamp backgrounds, being introduced to Node and NPM is a pivotal moment. I’m a pretty big fan of the npm registry.
