-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: migrate to eslint * chore: ignore `vue/one-component-per-file` * chore: fix ts error
- Loading branch information
Showing
38 changed files
with
2,246 additions
and
744 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dist | ||
node_modules | ||
examples/vite-ssr | ||
tests/e2e/vite-ssr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
}, | ||
extends: '@antfu/eslint-config', | ||
rules: { | ||
'vue/one-component-per-file': 'off' | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Release | |
on: | ||
push: | ||
tags: | ||
- "v*" | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,32 @@ | ||
<script lang="ts" setup> | ||
import { useHead } from "#head" | ||
import { useHead } from '#head' | ||
const page = ref({ | ||
title: "Home", | ||
description: "Home page description", | ||
image: "https://nuxtjs.org/meta_400.png", | ||
title: 'Home', | ||
description: 'Home page description', | ||
image: 'https://nuxtjs.org/meta_400.png', | ||
}) | ||
useHead({ | ||
title: computed(() => `${page.value.title} | Nuxt`), | ||
meta: [ | ||
{ | ||
name: "description", | ||
name: 'description', | ||
content: computed(() => page.value.description), | ||
}, | ||
{ | ||
property: "og:image", | ||
property: 'og:image', | ||
content: computed(() => page.value.image), | ||
}, | ||
], | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<h1>Index</h1> | ||
<nuxt-link to="/second">second page</nuxt-link> | ||
<nuxt-link to="/second"> | ||
second page | ||
</nuxt-link> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,43 @@ | ||
<script lang="ts" setup> | ||
await new Promise((resolve) => setTimeout(resolve, 1000)) | ||
await new Promise(resolve => setTimeout(resolve, 1000)) | ||
const title = ref("Intermediately title with 1s delay") | ||
const title = ref('Intermediately title with 1s delay') | ||
useHead({ | ||
title, | ||
bodyAttrs: { | ||
class: "new-bg", | ||
class: 'new-bg', | ||
}, | ||
style: [ | ||
// this is an example of the side effects of this rendering strategy | ||
// this style won't be hydrated at all | ||
{ | ||
children: `.new-bg { background-color: lemonchiffon; } h2 { color: ${ | ||
process.server ? "red" : "lime" | ||
process.server ? 'red' : 'lime' | ||
}; }`, | ||
}, | ||
], | ||
}) | ||
const changeTitle = () => { | ||
title.value = "Intermediately title updated" | ||
title.value = 'Intermediately title updated' | ||
} | ||
const finalTitle = computed(() => { | ||
return title.value.replace("Intermediately", "Final") | ||
return title.value.replace('Intermediately', 'Final') | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<h2>second page</h2> | ||
<p>has a 1 second delay on rendering</p> | ||
<ModifyTitle :title="finalTitle" /> | ||
<button @click="changeTitle">change title</button> | ||
<nuxt-link to="/">first page</nuxt-link> | ||
<button @click="changeTitle"> | ||
change title | ||
</button> | ||
<nuxt-link to="/"> | ||
first page | ||
</nuxt-link> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
<script setup> | ||
import { ref } from "vue" | ||
import { Head } from "../../src" | ||
import { ref } from 'vue' | ||
import { Head } from '../../src' | ||
const count = ref(0) | ||
const style = `button {color: red}` | ||
const style = 'button {color: red}' | ||
</script> | ||
|
||
<template> | ||
<Head> | ||
<title>{{ count }}</title> | ||
<html lang="en"></html> | ||
<body class="body"></body> | ||
<meta name="description" content="desc" /> | ||
<html lang="en" /> | ||
<body class="body" /> | ||
<meta name="description" content="desc"> | ||
<component is="style"> | ||
body { background: lightgreen; } {{ style }}</component | ||
> | ||
body { background: lightgreen; } {{ style }} | ||
</component> | ||
</Head> | ||
|
||
<router-link to="/">Back Home</router-link> | ||
<router-link to="/"> | ||
Back Home | ||
</router-link> | ||
|
||
<hr /> | ||
<hr> | ||
|
||
<button @click="count++">{{ count }}</button> | ||
<button @click="count++"> | ||
{{ count }} | ||
</button> | ||
</template> |
Oops, something went wrong.