Skip to content

Commit

Permalink
fix(create-vite): remove import from public (#9074)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Jul 13, 2022
1 parent 592d879 commit 880f560
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 20 deletions.
3 changes: 1 addition & 2 deletions packages/create-vite/template-lit-ts/src/my-element.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { html, css, LitElement } from 'lit'
import { customElement, property } from 'lit/decorators.js'
import viteLogo from '/vite.svg'
import litLogo from './assets/lit.svg'

/**
Expand All @@ -27,7 +26,7 @@ export class MyElement extends LitElement {
return html`
<div>
<a href="https://vitejs.dev" target="_blank">
<img src="${viteLogo}" class="logo" alt="Vite logo" />
<img src="/vite.svg" class="logo" alt="Vite logo" />
</a>
<a href="https://lit.dev" target="_blank">
<img src=${litLogo} class="logo lit" alt="Lit logo" />
Expand Down
3 changes: 1 addition & 2 deletions packages/create-vite/template-lit/src/my-element.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { html, css, LitElement } from 'lit'
import viteLogo from '/vite.svg'
import litLogo from './assets/lit.svg'

/**
Expand Down Expand Up @@ -33,7 +32,7 @@ export class MyElement extends LitElement {
return html`
<div>
<a href="https://vitejs.dev" target="_blank">
<img src="${viteLogo}" class="logo" alt="Vite logo" />
<img src="/vite.svg" class="logo" alt="Vite logo" />
</a>
<a href="https://lit.dev" target="_blank">
<img src=${litLogo} class="logo lit" alt="Lit logo" />
Expand Down
3 changes: 1 addition & 2 deletions packages/create-vite/template-preact-ts/src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useState } from 'preact/hooks'
import viteLogo from '/vite.svg'
import preactLogo from './assets/preact.svg'
import './app.css'

Expand All @@ -10,7 +9,7 @@ export function App() {
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} class="logo" alt="Vite logo" />
<img src="/vite.svg" class="logo" alt="Vite logo" />
</a>
<a href="https://preactjs.com" target="_blank">
<img src={preactLogo} class="logo preact" alt="Preact logo" />
Expand Down
3 changes: 1 addition & 2 deletions packages/create-vite/template-preact/src/app.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useState } from 'preact/hooks'
import viteLogo from '/vite.svg'
import preactLogo from './assets/preact.svg'
import './app.css'

Expand All @@ -10,7 +9,7 @@ export function App() {
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} class="logo" alt="Vite logo" />
<img src="/vite.svg" class="logo" alt="Vite logo" />
</a>
<a href="https://preactjs.com" target="_blank">
<img src={preactLogo} class="logo preact" alt="Preact logo" />
Expand Down
3 changes: 1 addition & 2 deletions packages/create-vite/template-react-ts/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useState } from 'react'
import viteLogo from '/vite.svg'
import reactLogo from './assets/react.svg'
import './App.css'

Expand All @@ -10,7 +9,7 @@ function App() {
<div className="App">
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
<img src="/vite.svg" className="logo" alt="Vite logo" />
</a>
<a href="https://reactjs.org" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
Expand Down
3 changes: 1 addition & 2 deletions packages/create-vite/template-react/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useState } from 'react'
import viteLogo from '/vite.svg'
import reactLogo from './assets/react.svg'
import './App.css'

Expand All @@ -10,7 +9,7 @@ function App() {
<div className="App">
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
<img src="/vite.svg" className="logo" alt="Vite logo" />
</a>
<a href="https://reactjs.org" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
Expand Down
3 changes: 1 addition & 2 deletions packages/create-vite/template-svelte-ts/src/App.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<script lang="ts">
import viteLogo from '/vite.svg'
import svelteLogo from './assets/svelte.svg'
import Counter from './lib/Counter.svelte'
</script>

<main>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} class="logo" alt="Vite Logo" />
<img src="/vite.svg" class="logo" alt="Vite Logo" />
</a>
<a href="https://svelte.dev" target="_blank">
<img src={svelteLogo} class="logo svelte" alt="Svelte Logo" />
Expand Down
3 changes: 1 addition & 2 deletions packages/create-vite/template-svelte/src/App.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<script>
import viteLogo from '/vite.svg'
import svelteLogo from './assets/svelte.svg'
import Counter from './lib/Counter.svelte'
</script>

<main>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} class="logo" alt="Vite Logo" />
<img src="/vite.svg" class="logo" alt="Vite Logo" />
</a>
<a href="https://svelte.dev" target="_blank">
<img src={svelteLogo} class="logo svelte" alt="Svelte Logo" />
Expand Down
3 changes: 1 addition & 2 deletions packages/create-vite/template-vanilla-ts/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import './style.css'
import viteLogo from '/vite.svg'
import typescriptLogo from './typescript.svg'
import { setupCounter } from './counter'

document.querySelector<HTMLDivElement>('#app')!.innerHTML = `
<div>
<a href="https://vitejs.dev" target="_blank">
<img src="${viteLogo}" class="logo" alt="Vite logo" />
<img src="/vite.svg" class="logo" alt="Vite logo" />
</a>
<a href="https://www.typescriptlang.org/" target="_blank">
<img src="${typescriptLogo}" class="logo vanilla" alt="TypeScript logo" />
Expand Down
3 changes: 1 addition & 2 deletions packages/create-vite/template-vanilla/main.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import './style.css'
import viteLogo from '/vite.svg'
import javascriptLogo from './javascript.svg'
import { setupCounter } from './counter.js'

document.querySelector('#app').innerHTML = `
<div>
<a href="https://vitejs.dev" target="_blank">
<img src="${viteLogo}" class="logo" alt="Vite logo" />
<img src="/vite.svg" class="logo" alt="Vite logo" />
</a>
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
<img src="${javascriptLogo}" class="logo vanilla" alt="JavaScript logo" />
Expand Down

0 comments on commit 880f560

Please sign in to comment.