GitHub

Helper utilities

These utilities can be imported and used within your own projects, as they are already used within kolay. This should allow users to build their own specific set of outputs using the same underlying tools that kolay uses.

gitRef

Returns the short git SHA of the current commit. Useful for displaying the deployed version somewhere in your app.

In an ESM environment:

import { gitRef } from "kolay/build";

// in some config
version: gitRef();

In a CJS environment (e.g. ember-cli-build.js):

const { gitRef } = require("kolay/build/legacy");

// in some config
version: gitRef();
gitRef
  • (
    ) =>
    string

packageTypes

packageTypes
  • (
    packageName
    string
    ) =>
    Promise
    <
    • dir
      string
    • manifest
      any
    • types
      Array of
      string
    >

virtualFile

virtualFile
  • (
    options
    VirtualFileOptions
    Array of
    VirtualFileOptions
    ) =>
    Omit
    <
    UnpluginOptions
    "name"
    >

generateTypeDocJSON

generateTypeDocJSON
  • (
    options
    Options
    ) =>
    Promise
    <
    unknown
    >