Skip to content
eln / 0.0.3-alpha.10

eln 0.0.3-alpha.10

Install from the command line:
Learn more about npm packages
$ npm install @cdd/eln@0.0.3-alpha.10
Install via package.json:
"@cdd/eln": "0.0.3-alpha.10"

About this version

#Eln

Installation

To install this package, you need to set up your project to download packages from GitHub Packages. Here is the step-by-step guide:

  1. First, you need to create a personal access token in GitHub.
    • Go to your GitHub Settings (click your profile picture in the top right > Settings)
    • On the left sidebar, click "Developer Settings"
    • Click "Personal access tokens"
    • Click "Generate new token"
    • Give your token a name, and check the box "read:packages"
    • Click "Generate token" at the bottom

Note: Be sure to copy the token now. You will not be able to see it again!

  1. Create or modify the .npmrc file in your project root directory (or your home directory, if you want to use it for all your projects). The file should contain the following lines:
registry=https://registry.npmjs.org/
@cdd:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}

Set your environment variable GITHUB_TOKEN to the personal access token you just created. Please note that the environment variable should be set in the environment where npm/yarn commands are run.

Unix-based example:

export GITHUB_TOKEN="your-token-goes-here"
  1. Now you are ready to install the package. You can use either yarn or npm:
yarn add @cdd/eln

or

npm install @cdd/eln

Usage

After installation, you can import the package in your JavaScript (or TypeScript) code:

const ElnEntry = require("@cdd/eln");

Or with ES6 import:

import { someFunction } from "@cdd/eln";