This video is available to students only

Create GitHub repository#

GitHub has a generous free plan which allows us to create private repositories, run a CI/CD environment, and host private NPM packages. The first step for our new component library is to create a private GitHub repository.

Create new GitHub repository

Repository details:

  • Owner

    • Use your GitHub username

    • If your company uses GitHub you may create this package under their organization when creating a component library for production

  • Name

    • Use component-library

  • Permissions

    • Make sure the repository is listed as PRIVATE

  • README / .gitignore

    • Provide a default README as well as the Node .gitignore template

Clone repository#

Once the repository is created, let's clone it to our machine.

When the repository is finished cloning, open it in your editor of choice. You should see the README and .gitignore we defined in the previous step.

empty package

Initialize the package#

To help the initial package creation we will use the npm-init command.

You will see a new package.json with its values pre-populated to match our repository. Let's update the name of the package to include our GitHub account as a scope:

Please select a discussion on the left.