Skip to content

Commit

Permalink
feat(plugin): 新增vite插件模板
Browse files Browse the repository at this point in the history
  • Loading branch information
jeddygong committed May 28, 2022
1 parent 5257038 commit 7f0a965
Show file tree
Hide file tree
Showing 57 changed files with 4,897 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ lerna-debug.log*
node_modules
dist
dist-ssr
vite-plugin-template
*.local

# Editor directories and files
Expand Down
3 changes: 3 additions & 0 deletions vite-plugin-template/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
examples/
dist/
24 changes: 24 additions & 0 deletions vite-plugin-template/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"root": true,
"env": {
"browser": true,
"es2021": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {
"no-console": 1
}
}
24 changes: 24 additions & 0 deletions vite-plugin-template/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
14 changes: 14 additions & 0 deletions vite-plugin-template/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

.eslintignore
.eslintrc
.gitignore
tsconfig.json
pnpm-lock.yaml

node_modules/
examples/
src/

demo.gif
README.md
LICENSE
15 changes: 15 additions & 0 deletions vite-plugin-template/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "always",
"requirePragma": false,
"insertPragma": false,
"proseWrap": "preserve",
"endOfLine": "auto"
}
3 changes: 3 additions & 0 deletions vite-plugin-template/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}
13 changes: 13 additions & 0 deletions vite-plugin-template/examples/vite-react/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<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 App</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
22 changes: 22 additions & 0 deletions vite-plugin-template/examples/vite-react/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "vite-react",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@types/react": "^17.0.33",
"@types/react-dom": "^17.0.10",
"@vitejs/plugin-react": "^1.0.7",
"typescript": "^4.5.4",
"vite": "link:../../node_modules/vite",
"vite-plugin-progress": "link:../../"
}
}
Loading

0 comments on commit 7f0a965

Please sign in to comment.