UNPKG

astro-cloudinary

Version:

<a href="https://github.com/cloudinary-community/astro-cloudinary/actions/workflows/test_and_release.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/cloudinary-community/astro-cloudinary/test_and_release.y

15 lines (13 loc) 505 B
import astroPkg from 'astro/package.json'; import pkg from '../../package.json'; export const ASTRO_CLOUDINARY_ANALYTICS_PRODUCT_ID = 'B'; export const ASTRO_CLOUDINARY_ANALYTICS_ID = 'G'; export const ASTRO_VERSION = normalizeVersion(astroPkg.version); export const ASTRO_CLOUDINARY_VERSION = normalizeVersion(pkg.version); function normalizeVersion(version: string) { let normalized = version; if ( normalized.includes('-') ) { normalized = normalized.split('-')[0]; } return normalized; }