cix-lic

Licensing via CLI (Command-Line), CI (Continuous Integration), and API

Usage no npm install needed!

<script type="module">
  import cixLic from 'https://cdn.skypack.dev/cix-lic';
</script>

README

cix-lic Build Status Coverage Status

Licensing via CLI (Command-Line), CI (Continuous Integration), and API

Overview

This cix-lic modules can license a project via several capabilities.

  • CLI - Command Line
  • CI - Continuous Integration
  • API - Application Program Interface

LIC Properties

Before we use cix-lic, it's important to know what properties are used. It's called LIC Properties.

  • lic | -l - the license identifier, see licenses - default: "License"

  • owner | -o - the owner - default: "Unknown"

  • beginYear | -b - the declarative begin year - default: current year

  • endYear | -e - the declarative end year - default: "Present"

  • proc | -p - the process - default: ["lic", "file"]

  • baseDir | -d - the directory where to query files - default: root source directory

  • filter | -f - the file filter can be string, RegExp, or { test: () => boolean } - default: *.js

  • HFLcontent | -h - the Head File License Content (file header content) - default: undefined

  • licenseContent | -c - the License Content (license content) - default: undefined

  • licenseFile - the License File (license file) - default: ./LICENSE

CLI - Command Line

Installation

npm install -g cix-lic

Usage

cix-lic [Command Tags]

CI - Continuous Integration

Installation

npm install cix-lic --save-dev

Usage

In package.json file,

// in package.json file
{
  "scripts": {
    "cix-lic": "cix-lic [Command Tags]"
    ...
  }
}

Then, we can run cix-lic script in CI Process.

CIX-LIC Command

Command Tags are LIC Properties

Examples

cix-lic -o Jane Smith -l mit >> owner: Jane Smith, lic: MIT License

cix-lic -d ./lib -l apache-2.0 >> baseDir: ./lib, lic: Apache License 2.0