open-index/open-npm huggingface dataset:
npm package: @skrift/preview-server
Description: A live preview of your pdf files right in your browser.
Latest version: 0.0.10

<div align="center"><strong>@skrift/preview-server</strong></div>
<div align="center">A live preview of your documents right in your browser.</div>
<br />
<div align="center">
<a href="https://skrift.app">Website</a> 
<span> · </span>
<a href="https://github.com/maxscn/skrift">GitHub</a> 
<span> · </span>
<a href="https://skrift.app/discord">Discord</a>
</div>

This package is used to store the preview server, it is also published and versioned so that it can be installed when the [CLI](../skrift) is being used.

## Development workflow

### 1. Seed document templates

```sh
pnpm dev:seed
```

This generates a boilerplate documents directory for you to work with. These files can also be modified as you see fit since they are not included in git.

### 2. Run development server

```sh
pnpm dev
```

This is somewhat equivalent to `next dev` and does not support hot reloading for document templates like the CLI does. It lets you work on the UI for the preview server mainly.

### 3. Open in your browser

Go to http://localhost:3000
npm package: @skrift/render
Description: Transform React components into HTML document templates
Latest version: 0.0.3

![Skrift button cover](https://skrift.app/static/covers/render.png)

<div align="center"><strong>@skrift/render</strong></div>
<div align="center">Transform React components into HTML document templates.</div>
<br />
<div align="center">
<a href="https://skrift.app">Website</a> 
<span> · </span>
<a href="https://github.com/maxscn/skrift">GitHub</a> 
<span> · </span>
<a href="https://skrift.app/discord">Discord</a>
</div>

## Install

Install component from your command line.

#### With yarn

```sh
yarn add @skrift/render -E
```

#### With npm

```sh
npm install @skrift/render -E
```

## Getting started

Convert React components into a HTML string.

```jsx
import { MyTemplate } from "../components/MyTemplate";
import { render } from "@skrift/render";

const html = await render(<MyTemplate firstName="Jim" />);
```

## License

MIT License
npm package: @skrift/skrift
Description: A live preview of your documents right in your browser.
Latest version: 0.0.10

![Skrift cover](https://skrift.app/static/covers/skrift.png)

<div align="center"><strong>Skrift</strong></div>
<div align="center">The next generation of writing documents.<br />High-quality, unstyled components for creating documents.</div>
<br />
<div align="center">
<a href="https://skrift.app">Website</a> 
<span> · </span>
<a href="https://github.com/maxscn/skrift">GitHub</a> 
<span> · </span>
<a href="https://skrift.app/discord">Discord</a>
</div>

## Getting started

To get started, open a new shell and run:

```sh
npx create-document
```

This will create a new folder called `documents` with a few document templates.

## Commands

### `document dev`

Starts a local development server that will watch your files and automatically rebuild your document when you make changes.

```sh
npx skrift dev
```

### `document export`

Generates the plain HTML files of your documents into a `out` directory.

```sh
npx skrift export
```

## Setting Up the Environment

When working in the CLI, a lot of friction can get introduced with installing it and rebuilding for every change. To avoid that, we have a script that can be linked globally to directly run the source code of the CLI. You can use it the same as you would the standard CLI.

### 1. Link `skrift` globally

```sh
pnpm link ./dev -g
```

### 2. Run the CLI

```sh
document-dev [command] [flags]
```

## License

MIT License