Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 23 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ A TypeScript library for interfacing with the Screenly Edge Apps API.

## Installation

> [!IMPORTANT]
> This package requires [Bun](https://bun.sh). The `edge-apps-scripts` CLI will not work with `npm` or `node` at this time.
> [!NOTE]
> Requires Node.js >= 20.6.0.

```bash
npm install @screenly/edge-apps
```

Or with Bun:
Comment thread
nicomiguelino marked this conversation as resolved.

```bash
bun add @screenly/edge-apps
Expand All @@ -20,26 +26,22 @@ When developing Edge Apps locally using the library from this repository, you sh
First, in the root of this repository:

```bash
bun link
npm install
npm run build
npm link
Comment thread
nicomiguelino marked this conversation as resolved.
```

Then in your Edge App directory:

```bash
cd /path/to/your-edge-app
bun link @screenly/edge-apps
npm link @screenly/edge-apps
```

To unlink the package when you're done with local development, run the following in your Edge App directory:

```bash
bun install --force
```

Then in the root of this repository:

```bash
bun unlink
npm install
```

## Quick Start
Expand Down Expand Up @@ -97,7 +99,7 @@ signalReady()

## Web Components

This library includes reusable web components for building consistent Edge Apps. See the [components documentation](https://github.com/Screenly/edge-apps-library/blob/master/docs/components.md) for usage details.
This library includes reusable web components for building consistent Edge Apps. See the [components documentation](https://github.com/Screenly/edge-apps-library/blob/main/docs/components.md) for usage details.

## Edge Apps Scripts CLI

Expand All @@ -110,35 +112,35 @@ This package provides the `edge-apps-scripts` CLI tool for running shared develo
Start the Vite development server with mock data from `screenly.yml` and `mock-data.yml`:

```bash
bun run dev
npm run dev
```

#### Building

```bash
bun run build
npm run build
```

#### Linting

To lint your Edge App:

```bash
bun run lint
npm run lint
```

To lint and automatically fix issues:

```bash
bun run lint -- --fix
npm run lint -- --fix
```

#### Type Checking

Run TypeScript type checking:

```bash
bun run type-check
npm run type-check
```

### Command-Line Utilities for Edge Apps
Expand All @@ -158,7 +160,7 @@ It is recommended to add the following scripts to your Edge App's `package.json`
"build:dev": "edge-apps-scripts build:dev",
"lint": "edge-apps-scripts lint",
"type-check": "edge-apps-scripts type-check",
"deploy": "bun run build && screenly edge-app deploy --path=dist/"
"deploy": "npm run build && screenly edge-app deploy --path=dist/"
}
}
```
Expand Down Expand Up @@ -197,7 +199,7 @@ import type {
## Development

```bash
bun install # Install dependencies
bun test # Run tests
bun run build # Build library
npm install # Install dependencies
npm test # Run tests
npm run build # Build library
```