README.md 1.4 KB
Newer Older
1 2 3 4
# Stenciljs example

## Deploy your own

T
Tim Neutkens 已提交
5
Deploy the example using [Vercel](https://vercel.com):
6

7
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/next.js/tree/canary/examples/with-stencil)
8 9 10

## How to use

11
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) or [npx](https://github.com/zkat/npx#readme) to bootstrap the example:
12 13 14 15 16 17 18

```bash
npx create-next-app --example with-stencil with-stencil-app
# or
yarn create next-app --example with-stencil with-stencil-app
```

T
Tim Neutkens 已提交
19
Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
20

A
Andy 已提交
21 22
> Choose `packages/web-app` as root directory when deploying.

23 24 25 26 27 28 29 30 31 32 33 34 35 36
## The idea behind the example

Stencil is a compiler that generates Web Components (more specifically, Custom Elements). Stencil combines the best concepts of the most popular frameworks into a simple build-time tool.

In this example we have two workspaces:

- **web-app**: A Next.js app
- **test-component**: A stencil components

## Useful Links

- [Documentation](https://stenciljs.com/docs/introduction)
- [yarn workspaces](https://yarnpkg.com/lang/en/docs/cli/workspace)
- [yarn workspace](https://yarnpkg.com/lang/en/docs/cli/workspaces)