generated from unplugin/unplugin-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
316a094
commit 933a322
Showing
14 changed files
with
1,523 additions
and
1,211 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,17 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"dev": "nodemon -w '../src/**/*.ts' -e .ts -x webpack build" | ||
}, | ||
"dependencies": { | ||
"git-repo-info": "^2.1.1", | ||
"html-loader": "^4.2.0", | ||
"webpack": "^5.78.0", | ||
"webpack-cli": "^5.0.1" | ||
}, | ||
"devDependencies": { | ||
"html-webpack-plugin": "^5.5.0", | ||
"ts-loader": "^9.4.2", | ||
"typescript": "^4.9.5" | ||
} | ||
} |
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,118 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>元数据管理平台</title> | ||
</head> | ||
|
||
<body> | ||
<div id="app"> | ||
<style> | ||
.first-loading-wrap { | ||
display: flex; | ||
width: 100%; | ||
height: 100vh; | ||
justify-content: center; | ||
align-items: center; | ||
flex-direction: column; | ||
} | ||
|
||
.first-loading-wrap>h1 { | ||
font-size: 128px; | ||
} | ||
|
||
.first-loading-wrap .loading-wrap { | ||
padding: 98px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.dot { | ||
animation: antRotate 1.2s infinite linear; | ||
transform: rotate(45deg); | ||
position: relative; | ||
display: inline-block; | ||
font-size: 32px; | ||
width: 32px; | ||
height: 32px; | ||
box-sizing: border-box; | ||
} | ||
|
||
.dot i { | ||
width: 14px; | ||
height: 14px; | ||
position: absolute; | ||
display: block; | ||
background-color: #1890ff; | ||
border-radius: 100%; | ||
transform: scale(0.75); | ||
transform-origin: 50% 50%; | ||
opacity: 0.3; | ||
animation: antSpinMove 1s infinite linear alternate; | ||
} | ||
|
||
.dot i:nth-child(1) { | ||
top: 0; | ||
left: 0; | ||
} | ||
|
||
.dot i:nth-child(2) { | ||
top: 0; | ||
right: 0; | ||
-webkit-animation-delay: 0.4s; | ||
animation-delay: 0.4s; | ||
} | ||
|
||
.dot i:nth-child(3) { | ||
right: 0; | ||
bottom: 0; | ||
-webkit-animation-delay: 0.8s; | ||
animation-delay: 0.8s; | ||
} | ||
|
||
.dot i:nth-child(4) { | ||
bottom: 0; | ||
left: 0; | ||
-webkit-animation-delay: 1.2s; | ||
animation-delay: 1.2s; | ||
} | ||
|
||
@keyframes antRotate { | ||
to { | ||
-webkit-transform: rotate(405deg); | ||
transform: rotate(405deg); | ||
} | ||
} | ||
|
||
@-webkit-keyframes antRotate { | ||
to { | ||
-webkit-transform: rotate(405deg); | ||
transform: rotate(405deg); | ||
} | ||
} | ||
|
||
@keyframes antSpinMove { | ||
to { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
@-webkit-keyframes antSpinMove { | ||
to { | ||
opacity: 1; | ||
} | ||
} | ||
</style> | ||
<div class="first-loading-wrap"> | ||
<div class="loading-wrap"> | ||
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span> | ||
</div> | ||
</div> | ||
</div> | ||
</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 |
---|---|---|
@@ -0,0 +1 @@ | ||
document.getElementById("app")!.innerHTML = "__UNPLUGIN__"; |
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,30 @@ | ||
// const MyExampleWebpackPlugin = require("../../src/index.js"); | ||
import HtmlWebpackPlugin from "html-webpack-plugin"; | ||
import Unplugin from "../../src/webpack"; | ||
|
||
export default { | ||
mode: "development", | ||
entry: "./src/index.ts", | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
use: "ts-loader", | ||
exclude: /node_modules/, | ||
}, | ||
{ | ||
test: /\.html$/i, | ||
loader: "html-loader", | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
template: "public/index.html", | ||
}), | ||
Unplugin(), | ||
], | ||
resolve: { | ||
extensions: [".ts"], | ||
}, | ||
}; |
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,10 +1,10 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"dev": "nodemon -w '../src/**/*.ts' -e .ts -x vite" | ||
"dev": "nodemon -w '../src/**/*.ts' -e .ts -x vite build" | ||
}, | ||
"devDependencies": { | ||
"vite": "^4.0.0", | ||
"vite-plugin-inspect": "^0.7.10" | ||
"vite": "^4.2.1", | ||
"vite-plugin-inspect": "^0.7.18" | ||
} | ||
} |
Oops, something went wrong.