tastespots
v1.0.18
Published
Shared types, constants and utilities for TasteSpots apps
Maintainers
Readme
@tastespots/shared-packages
Shared types, constants and utilities for TasteSpots applications.
Installation
npm install @tastespots/shared-packages
# or
yarn add @tastespots/shared-packages
# or
pnpm add @tastespots/shared-packagesUsage
Basic Import
import /* your imports */ "@tastespots/shared-packages";Available Exports
Constants
import {
COLORS,
SIZES,
API_ENDPOINTS,
} from "@tastespots/shared-packages/constants";Types
import { User, Restaurant, Review } from "@tastespots/shared-packages/types";Common Supabase API
import { supabaseApi } from "@tastespots/shared-packages/common-supabase/api";Internationalization
import { translations } from "@tastespots/shared-packages/i18n/translations";
import { i18nConfig } from "@tastespots/shared-packages/i18n";Next.js Only (Server-side)
// Only available in Next.js applications
import { createServerClient } from "@tastespots/shared-packages/next-only/supabase/server";
import { createBrowserClient } from "@tastespots/shared-packages/next-only/supabase/client";Peer Dependencies
This package has optional peer dependencies:
@supabase/ssr(^0.6.1) - Required for Next.js server-side functionalitynext(>=14.2.26) - Required for Next.js specific features
Install them only if you're using Next.js:
npm install @supabase/ssr nextDevelopment
Building the Package
npm run buildWatching for Changes
npm run watchType Checking
npm run type-checkPublishing
The package is automatically built before publishing. Use one of these commands:
# Patch version (1.0.0 -> 1.0.1)
npm run publish:patch
# Minor version (1.0.0 -> 1.1.0)
npm run publish:minor
# Major version (1.0.0 -> 2.0.0)
npm run publish:majorLicense
MIT
