MCPcopy Create free account
hub / github.com/algolia/docsearch / getBundleBanner

Function getBundleBanner

scripts/getBundleBanner.js:3–9  ·  view source on GitHub ↗
(pkg)

Source from the content-addressed store, hash-verified

1import { execSync } from 'child_process';
2
3export function getBundleBanner(pkg) {
4 const lastCommitHash = execSync('git rev-parse --short HEAD').toString().trim();
5 const version = process.env.SHIPJS ? pkg.version : `${pkg.version} (UNRELEASED ${lastCommitHash})`;
6 const authors = '© Algolia, Inc. and contributors';
7
8 return `/*! ${pkg.name} ${version} | MIT License | ${authors} | ${pkg.homepage} */`;
9}

Callers 4

sourceOutputFunction · 0.90
sourceOutputFunction · 0.90
sourceOutputFunction · 0.90
sourceOutputFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected