Skip to content

Alinex Core Module

The core module is a base for all of my alinex modules. It has some common methods which are necessary in nearly any of my packages.

At the moment it contains:

  • exit - handler for process exits
  • logo - a method to present ASCII art command line logos

Installation

To include this in your module install it:

npm install @alinex/core --save

Now only include it in your code and call it's methods.

Usage

Command line modules should import the default methods and can use the logo display from it. But for module you may also only import specific functionalities:

// load default methods
import core from '@alinex/core'
// load all parts
import * as core from '@alinex/core'
// load specific elements into own variables
import { logo } from '@alinex/core'
// load only the defaults
const core = require('@alinex/core').default
// load all parts
const core = require('@alinex/core')

Last update: December 31, 2020