# Setup Instructions

Since network access is currently disabled, follow these steps on your local machine:

## 1. Copy the Package

Copy the entire `his-js` directory to your local machine.

## 2. Install Dependencies

```bash
cd his-js
npm install
```

This will install:
- `typescript` - For TypeScript compilation
- `esbuild` - For bundling
- `@types/node` - TypeScript definitions for Node.js
- `uuid` - For generating unique IDs

## 3. Build the Package

```bash
npm run build
```

This creates:
- `dist/index.js` - CommonJS bundle
- `dist/index.mjs` - ESM bundle
- `dist/index.d.ts` - TypeScript definitions

## 4. Test Locally

```bash
npm test
```

## 5. Test Installation

```bash
npm pack
```

This creates a `.tgz` file you can test installing in another project.

## 6. Publish to npm

```bash
# Login to npm (one time)
npm login

# Publish (for scoped packages)
npm publish --access public
```

## Alternative: Manual Build (No Dependencies)

If you can't install dependencies, you can publish just the source:

1. Remove the build scripts from `package.json`
2. Change `main` to `src/index.ts`
3. Users will need to compile it themselves

But this is not recommended - always build before publishing!

## Quick Start After Setup

```bash
npm install    # Install dependencies
npm run build  # Build the package
npm test       # Run tests
npm publish --access public  # Publish to npm
```

## Need Help?

See `PUBLISHING.md` for detailed publishing instructions.
