Skip to content

Commit

Permalink
初始化
Browse files Browse the repository at this point in the history
  • Loading branch information
hellow-monkey committed Mar 9, 2022
0 parents commit 2da8ee4
Show file tree
Hide file tree
Showing 48 changed files with 16,332 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules
/build
/dist
21 changes: 21 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ["plugin:@typescript-eslint/recommended", "plugin:vue/vue3-recommended", "plugin:prettier/recommended"],
parserOptions: {
parser: "@typescript-eslint/parser",
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: "module",
},
rules: {},
settings: {},
globals: {
JSX: true,
NodeJS: true,
},
};
24 changes: 24 additions & 0 deletions .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?
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules
/build
/dist
11 changes: 11 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
arrowParens: 'avoid', // 箭头函数只有一个参数的时候可以忽略括号
endOfLine: 'lf', // 行结束符使用 Unix 格式
printWidth: 140, // 行宽
proseWrap: 'preserve', // 换行方式
semi: true, // 句尾添加分号
tabWidth: 2, // 缩进
trailingComma: 'es5', // 在对象或数组最后一个元素后面是否加逗号(在ES5中加尾逗号)
bracketSpacing: true, // 在对象,数组括号与文字之间加空格
semicolons: true, // 在语句末尾打印分号
}
19 changes: 19 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
"plugins": [
'stylelint-declaration-block-no-ignored-properties',
"stylelint-scss"
],
extends: ['stylelint-config-standard', 'stylelint-config-standard-scss'],
rules: {
"declaration-block-no-duplicate-properties": null,
"no-invalid-double-slash-comments": null,
"font-family-name-quotes": null,
"font-family-no-missing-generic-family-keyword": null,
"unit-case": null,
"unit-no-unknown": null,
"alpha-value-notation": null,
"selector-class-pattern": null,
"value-keyword-case": null,
"scss/at-import-partial-extension": null,
},
};
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["johnsoncodehk.volar"]
}
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Vue 3 + Typescript + Vite

This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.

## Recommended IDE Setup

- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)

## Type Support For `.vue` Imports in TS

Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's `.vue` type support plugin by running `Volar: Switch TS Plugin on/off` from VSCode command palette.
13 changes: 13 additions & 0 deletions 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" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"><div style="text-align: center; padding: 20% 0; color: #888; font-size: 14px">玩命加载中...</div></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading

0 comments on commit 2da8ee4

Please sign in to comment.