# Installation

Source: https://signy.dev/documentation/1/overview/installation/

From npm with a bundler, or one script tag with no build at all.

## npm

Install the package and import what you need.

```shell
npm install signy
```

```js
import { Component, Signal, application, html } from 'signy';
```

Signy also works with `yarn add signy` and `pnpm add signy`.

## CDN

The global build defines `Signy` on `window`, so a page needs no bundler and no build step.

```html
<script src="https://cdn.jsdelivr.net/npm/signy@1/dist/signy.global.min.js"></script>
<script>
  const { Component, Signal, application, html } = Signy;
</script>
```

## Entry points

The `signy` import has everything. The smaller entry points let a bundler leave out the parts you do not use.

| Import | What you get |
| --- | --- |
| `signy` | Everything below |
| `signy/core` | `Signal`, `Computed`, `effect`, `batch`, `untrack` and the other primitives. No DOM. |
| `signy/web` | Core plus `html`, `Component`, control flow, context and the DOM helpers |
| `signy/store` | `store`, `ReactiveStore`, `produce`, `unwrap` |
| `signy/router` | `router`, `Link`, `Outlet` and the route helpers |
| `signy/app` | `application` and `Application` |
| `signy/jsx-runtime` | The JSX runtime, see [JSX and TypeScript](https://signy.dev/documentation/1/overview/jsx-and-typescript/index.html.md) |

## Other builds

The package also ships ES2017 and ES5 builds in `dist`, for older browsers, and a global build per entry point, such as `signy.core.global.min.js`.
