Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(create-vite): migrate lit-element to lit #5012

Merged
merged 8 commits into from
Sep 25, 2021
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ Supported template presets include:
- `react-ts`
- `preact`
- `preact-ts`
- `lit-element`
- `lit-element-ts`
- `lit`
- `lit-ts`
- `svelte`
- `svelte-ts`

Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ Currently supported template presets include:
- `react-ts`
- `preact`
- `preact-ts`
- `lit-element`
- `lit-element-ts`
- `lit`
- `lit-ts`
- `svelte`
- `svelte-ts`

Expand Down
6 changes: 3 additions & 3 deletions packages/create-vite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ const FRAMEWORKS = [
]
},
{
name: 'lit-element',
name: 'lit',
color: lightRed,
variants: [
{
name: 'lit-element',
name: 'lit',
display: 'JavaScript',
color: yellow
},
{
name: 'lit-element-ts',
name: 'lit-ts',
display: 'TypeScript',
color: blue
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Lit-Element App</title>
<title>Vite + Lit App</title>
<script type="module" src="/src/my-element.ts"></script>
</head>
<body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "vite-lit-element-ts-starter",
"name": "vite-lit-ts-starter",
"version": "0.0.0",
"main": "dist/my-element.es.js",
"exports": {
Expand All @@ -15,7 +15,7 @@
"build": "tsc && vite build"
},
"dependencies": {
"lit-element": "^2.4.0"
"lit": "^2.0.0"
},
"devDependencies": {
"vite": "^2.5.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { LitElement, html, customElement, property, css } from 'lit-element'
import { html, css, LitElement } from 'lit'
import { customElement, property } from 'lit/decorators.js'

/**
* An example element.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
formats: ['es']
},
rollupOptions: {
external: /^lit-element/
external: /^lit/
}
}
})
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
types
*.local
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Lit-Element App</title>
<title>Vite + Lit App</title>
<script type="module" src="/src/my-element.js"></script>
</head>
<body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "vite-lit-element-starter",
"name": "vite-lit-starter",
"version": "0.0.0",
"main": "dist/my-element.es.js",
"exports": {
Expand All @@ -13,7 +13,7 @@
"build": "vite build"
},
"dependencies": {
"lit-element": "^2.4.0"
"lit": "^2.0.0"
},
"devDependencies": {
"vite": "^2.5.4"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LitElement, html, css } from 'lit-element'
import { html, css, LitElement } from 'lit'

/**
* An example element.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
formats: ['es']
},
rollupOptions: {
external: /^lit-element/
external: /^lit/
}
}
})
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<template>
<div>Example external component content</div>
</template>
<template>
<div>Example external component content</div>
</template>