forked from vitejs/vite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow: pre-commit runs prettier on *.html (vitejs#1555)
- Loading branch information
Showing
19 changed files
with
150 additions
and
135 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 |
---|---|---|
|
@@ -60,6 +60,9 @@ | |
"*.ts": [ | ||
"eslint", | ||
"prettier --parser=typescript --write" | ||
], | ||
"*.html": [ | ||
"prettier --write" | ||
] | ||
} | ||
} |
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,12 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
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,12 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
</body> | ||
</html> |
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,12 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
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,12 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
</body> | ||
</html> |
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,12 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/main.js"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/main.js"></script> | ||
</body> | ||
</html> |
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,13 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
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,13 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.js"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.js"></script> | ||
</body> | ||
</html> |
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,44 +1,37 @@ | ||
<h1>Environment Variables</h1> | ||
<p>import.meta.env.BASE_URL: <code class="base"></code></p> | ||
<p>import.meta.env.MODE: <code class="mode"></code></p> | ||
<p>import.meta.env.DEV: <code class="dev"></code></p> | ||
<p>import.meta.env.PROD: <code class="prod"></code></p> | ||
<p>import.meta.env.VITE_CUSTOM_ENV_VARIABLE: <code class="custom"></code></p> | ||
<p> | ||
import.meta.env.BASE_URL: <code class="base"></code> | ||
</p> | ||
<p> | ||
import.meta.env.MODE: <code class="mode"></code> | ||
</p> | ||
<p > | ||
import.meta.env.DEV: <code class="dev"></code> | ||
</p> | ||
<p > | ||
import.meta.env.PROD: <code class="prod"></code> | ||
</p> | ||
<p > | ||
import.meta.env.VITE_CUSTOM_ENV_VARIABLE: <code class="custom"></code> | ||
</p> | ||
<p > | ||
import.meta.env.VITE_EFFECTIVE_MODE_FILE_NAME: <code class="mode-file"></code> | ||
</p> | ||
<p > | ||
import.meta.env.VITE_INLINE: <code class="inline"></code> | ||
</p> | ||
<p> | ||
process.env.NODE_ENV: <code class="node-env"></code> | ||
</p> | ||
<p > | ||
import.meta.env: <pre class="env-object"></pre> | ||
import.meta.env.VITE_EFFECTIVE_MODE_FILE_NAME: <code class="mode-file"></code> | ||
</p> | ||
<p>import.meta.env.VITE_INLINE: <code class="inline"></code></p> | ||
<p>process.env.NODE_ENV: <code class="node-env"></code></p> | ||
<p>import.meta.env: <span class="pre env-object"></span></p> | ||
|
||
<script type="module"> | ||
text('.base', import.meta.env.BASE_URL) | ||
text('.mode', import.meta.env.MODE) | ||
text('.dev', import.meta.env.DEV) | ||
text('.prod', import.meta.env.PROD) | ||
text('.custom', import.meta.env.VITE_CUSTOM_ENV_VARIABLE) | ||
text('.mode-file', import.meta.env.VITE_EFFECTIVE_MODE_FILE_NAME) | ||
text('.inline', import.meta.env.VITE_INLINE) | ||
text('.node-env', process.env.NODE_ENV) | ||
text('.env-object', JSON.stringify(import.meta.env, null, 2)) | ||
text('.base', import.meta.env.BASE_URL) | ||
text('.mode', import.meta.env.MODE) | ||
text('.dev', import.meta.env.DEV) | ||
text('.prod', import.meta.env.PROD) | ||
text('.custom', import.meta.env.VITE_CUSTOM_ENV_VARIABLE) | ||
text('.mode-file', import.meta.env.VITE_EFFECTIVE_MODE_FILE_NAME) | ||
text('.inline', import.meta.env.VITE_INLINE) | ||
text('.node-env', process.env.NODE_ENV) | ||
text('.env-object', JSON.stringify(import.meta.env, null, 2)) | ||
|
||
function text(el, text) { | ||
document.querySelector(el).textContent = text | ||
} | ||
</script> | ||
|
||
function text(el, text) { | ||
document.querySelector(el).textContent = text | ||
} | ||
</script> | ||
<style> | ||
.pre { | ||
display: block; | ||
unicode-bidi: embed; | ||
font-family: monospace; | ||
white-space: pre; | ||
} | ||
</style> |
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,7 +1,7 @@ | ||
<link rel="stylesheet" href="./main.css"> | ||
<link rel="stylesheet" href="./main.css" /> | ||
|
||
<!-- comment one --> | ||
<h1>Hello</h1> | ||
<!-- comment two --> | ||
|
||
<script type="module" src="./main.js"></script> | ||
<script type="module" src="./main.js"></script> |
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,3 +1,3 @@ | ||
<link rel="stylesheet" href="./nested.css"> | ||
<link rel="stylesheet" href="./nested.css" /> | ||
<h1>Nested</h1> | ||
<script type="module" src="./nested.js"></script> | ||
<script type="module" src="./nested.js"></script> |
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,2 +1,2 @@ | ||
<h1 id="app"></h1> | ||
<script type="module" src="./main.js"></script> | ||
<script type="module" src="./main.js"></script> |
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,2 +1,2 @@ | ||
<div id="app"></div> | ||
<script type="module" src="./main.jsx"></script> | ||
<script type="module" src="./main.jsx"></script> |
Oops, something went wrong.