feat: apply phase1 DX cleanup for private registry
This commit is contained in:
@@ -15,7 +15,7 @@ A feature-rich, modern video player library built with React, TypeScript, and Vi
|
||||
|---------|---------------------|----------|--------------|------|
|
||||
| **Bundle Size (gzipped)** | **~18KB JS + ~3.5KB CSS** ✅ | ~500KB ❌ | ~50KB ⚠️ | ~30KB ⚠️ |
|
||||
| **Runtime Dependencies** | **0** ✅ | Many ❌ | Few ⚠️ | Few ⚠️ |
|
||||
| **React Native** | **Yes** ✅ | Wrapper ⚠️ | **Yes** ✅ | Wrapper ⚠️ |
|
||||
| **React (Web)** | **Yes** ✅ | Wrapper ⚠️ | **Yes** ✅ | Wrapper ⚠️ |
|
||||
| **TypeScript Native** | **Yes** ✅ | Types ⚠️ | Partial ⚠️ | Types ⚠️ |
|
||||
| **HLS Support** | **Yes** ✅ | Yes ✅ | Yes ✅ | No ❌ |
|
||||
| **Quality Switching** | **Yes** ✅ | Yes ✅ | Limited ⚠️ | No ❌ |
|
||||
@@ -84,27 +84,45 @@ A feature-rich, modern video player library built with React, TypeScript, and Vi
|
||||
|
||||
## 📦 Installation
|
||||
|
||||
This is a local library project. To use it in your projects:
|
||||
This package is distributed through a private registry.
|
||||
|
||||
### Option 1: Copy the library
|
||||
```bash
|
||||
# Copy the src folder to your project
|
||||
cp -r src/components your-project/src/
|
||||
cp -r src/contexts your-project/src/
|
||||
cp -r src/hooks your-project/src/
|
||||
cp -r src/utils your-project/src/
|
||||
cp -r src/types your-project/src/
|
||||
cp -r src/icons your-project/src/
|
||||
cp -r src/styles your-project/src/
|
||||
### 1. Configure `.npmrc`
|
||||
|
||||
Create `.npmrc` in your app root:
|
||||
|
||||
```ini
|
||||
@source:registry=https://gits.hibna.com.tr/api/packages/hibna/npm/
|
||||
//gits.hibna.com.tr/api/packages/hibna/npm/:_authToken=${GITS_NPM_TOKEN}
|
||||
```
|
||||
|
||||
### Option 2: Build as library and link
|
||||
### 2. Set token
|
||||
|
||||
Set your token in environment variables (`GITS_NPM_TOKEN`) and do not commit `.npmrc` with a hardcoded token.
|
||||
|
||||
### 3. Install package
|
||||
|
||||
```bash
|
||||
# In this project
|
||||
npm install @source/player
|
||||
# or
|
||||
pnpm add @source/player
|
||||
# or
|
||||
yarn add @source/player
|
||||
```
|
||||
|
||||
### 4. Ensure peer dependencies
|
||||
|
||||
```bash
|
||||
npm install react react-dom
|
||||
```
|
||||
|
||||
### Local development (optional)
|
||||
|
||||
```bash
|
||||
# In this repository
|
||||
npm run build:lib
|
||||
npm link
|
||||
|
||||
# In your other project
|
||||
# In your consuming app
|
||||
npm link @source/player
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user