JSPM

  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q61924F

Package Exports

  • @bigdigital/kiosk-content-sdk
  • @bigdigital/kiosk-content-sdk/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bigdigital/kiosk-content-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm org create your-org


2. Login to npm:
```bash
npm login
  1. Build and publish:
npm run build
npm publish

Installing in Your Project

Since this is a private package, you'll need to:

  1. Make sure you're logged into npm with access to the organization:
npm login
  1. Install the package:
npm install @your-org/kiosk-content-sdk

Usage

import { useKioskContent } from '@your-org/kiosk-content-sdk';

function App() {
  const config = {
    projectId: process.env.VITE_FIREBASE_PROJECT_ID,
    apiKey: process.env.VITE_FIREBASE_API_KEY
  };

  const { content, loading } = useKioskContent(config);

  if (loading) return <div>Loading...</div>;

  return (
    <div>
      {content.map(item => (
        <div key={item.id}>
          <h2>{item.title}</h2>
          <p>{item.description}</p>
        </div>
      ))}
    </div>
  );
}

Development

To build locally:

npm install
npm run build