@gigya/api
v1.0.0
Published
Gigya API TypeScript Client
Readme
@gigya/api
TypeScript client for Gigya API
Installation
npm install @gigya/api
# or
pnpm add @gigya/api
# or
yarn add @gigya/apiUsage
import { Gigya } from '@gigya/api'
const client = new Gigya({
BASE: 'https://your-api-endpoint.com'
})
// Use the client...Development
This package supports both tsc (TypeScript Compiler) and tsup (bundler) for building.
Building
# Using tsc (default - recommended for type preservation)
npm run build
# Or using tsc explicitly
npm run build:tsc
# Or using tsup (alternative - faster builds with bundling)
npm run build:tsup
# Clean build artifacts
npm run cleanPublishing
Before publishing, make sure to:
- Update the version in the root
package.json - Test the build:
# Dry run to see what would be published
npm run publish:dry- Publish to npm:
# Publish as next tag (for beta/rc versions)
npm run publish:next
# Or publish as latest (for stable releases)
npm run publish:latestThe prepublishOnly hook will automatically clean and rebuild before publishing.
Build Outputs
- tsc: Generates separate
.jsand.d.tsfiles with source maps - tsup: Generates bundled ESM and CJS outputs with type declarations
Both methods produce production-ready code suitable for publishing to npm.
Package Exports
This package supports both ESM and CommonJS:
// ESM
import { Gigya } from '@gigya/api'
// CommonJS
const { Gigya } = require('@gigya/api')License
MIT
