Skip to content

Commit 80b2a26

Browse files
authored
调整配置
1 parent 6ba105f commit 80b2a26

15 files changed

+8425
-101
lines changed

.browserslistrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not dead

.editorconfig

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[*.{js,jsx,ts,tsx,vue}]
2+
indent_style = space
3+
indent_size = 2
4+
trim_trailing_whitespace = true
5+
insert_final_newline = true

.eslintrc.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
extends: [
7+
'plugin:vue/essential',
8+
'@vue/standard'
9+
],
10+
parserOptions: {
11+
ecmaVersion: 2020
12+
},
13+
rules: {
14+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
15+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
16+
indent: ["error", 2, { "MemberExpression": 1 }],
17+
semi: ["error", "never", { "beforeStatementContinuationChars": "always"}]
18+
}
19+
}

.github/workflows/release.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: build and deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
steps:
12+
- name: Install Node.js, Yarn
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 14
16+
17+
- name: Check out branch
18+
uses: actions/checkout@v2
19+
with:
20+
ref: master
21+
22+
- name: Install and Build
23+
run: |
24+
npm i -g yarn @vue/cli
25+
yarn
26+
yarn build
27+
- name: Upload Artifacts
28+
uses: actions/upload-artifact@v1
29+
with:
30+
name: dist
31+
path: dist
32+
33+
deploy:
34+
concurrency: ci-${{ github.ref }}
35+
needs: [build]
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v3
40+
41+
- name: Download Artifacts
42+
uses: actions/download-artifact@v1
43+
with:
44+
name: dist
45+
46+
- name: Deploy
47+
uses: JamesIves/[email protected]
48+
with:
49+
branch: gh-pages
50+
folder: 'dist'

.gitignore

+20-101
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,23 @@
1-
# Logs
2-
logs
3-
*.log
1+
.DS_Store
2+
node_modules
3+
/dist
4+
/lib
5+
6+
# local env files
7+
.env.local
8+
.env.*.local
9+
10+
# Log files
411
npm-debug.log*
512
yarn-debug.log*
613
yarn-error.log*
7-
lerna-debug.log*
8-
9-
# Diagnostic reports (https://nodejs.org/api/report.html)
10-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11-
12-
# Runtime data
13-
pids
14-
*.pid
15-
*.seed
16-
*.pid.lock
17-
18-
# Directory for instrumented libs generated by jscoverage/JSCover
19-
lib-cov
20-
21-
# Coverage directory used by tools like istanbul
22-
coverage
23-
*.lcov
24-
25-
# nyc test coverage
26-
.nyc_output
27-
28-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29-
.grunt
30-
31-
# Bower dependency directory (https://bower.io/)
32-
bower_components
33-
34-
# node-waf configuration
35-
.lock-wscript
36-
37-
# Compiled binary addons (https://nodejs.org/api/addons.html)
38-
build/Release
39-
40-
# Dependency directories
41-
node_modules/
42-
jspm_packages/
43-
44-
# TypeScript v1 declaration files
45-
typings/
46-
47-
# TypeScript cache
48-
*.tsbuildinfo
49-
50-
# Optional npm cache directory
51-
.npm
52-
53-
# Optional eslint cache
54-
.eslintcache
55-
56-
# Microbundle cache
57-
.rpt2_cache/
58-
.rts2_cache_cjs/
59-
.rts2_cache_es/
60-
.rts2_cache_umd/
61-
62-
# Optional REPL history
63-
.node_repl_history
64-
65-
# Output of 'npm pack'
66-
*.tgz
67-
68-
# Yarn Integrity file
69-
.yarn-integrity
70-
71-
# dotenv environment variables file
72-
.env
73-
.env.test
74-
75-
# parcel-bundler cache (https://parceljs.org/)
76-
.cache
77-
78-
# Next.js build output
79-
.next
80-
81-
# Nuxt.js build / generate output
82-
.nuxt
83-
dist
84-
85-
# Gatsby files
86-
.cache/
87-
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88-
# https://nextjs.org/blog/next-9-1#public-directory-support
89-
# public
90-
91-
# vuepress build output
92-
.vuepress/dist
93-
94-
# Serverless directories
95-
.serverless/
96-
97-
# FuseBox cache
98-
.fusebox/
99-
100-
# DynamoDB Local files
101-
.dynamodb/
102-
103-
# TernJS port file
104-
.tern-port
14+
pnpm-debug.log*
15+
16+
# Editor directories and files
17+
.idea
18+
.vscode
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw?

.npmignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/node_modules
2+
/public
3+
/src
4+
/.github
5+
/dist
6+
7+
# local env files
8+
.env.local
9+
.env.*.local
10+
11+
# Log files
12+
npm-debug.log*
13+
yarn-debug.log*
14+
yarn-error.log*
15+
pnpm-debug.log*
16+
17+
# Editor directories and files
18+
.idea
19+
.vscode
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
26+
*.config.js

babel.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/cli-plugin-babel/preset'
4+
]
5+
}

jest.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel'
3+
}

package.json

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"name": "vuetify-message-box",
3+
"version": "1.0.0",
4+
"description": "基于 vue2 + vuetify 的消息弹框组件",
5+
"main": "lib/vuetify-message-box.umd.min.js",
6+
"author": "luren",
7+
"homepage": "https://github.com/kscript",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/kscript/vuetify-message-box.git"
11+
},
12+
"bugs": {
13+
"url": "https://github.com/kscript/vuetify-message-box/issues"
14+
},
15+
"keywords": [
16+
"vue",
17+
"vuetify",
18+
"component",
19+
"message-box"
20+
],
21+
"scripts": {
22+
"serve": "vue-cli-service serve",
23+
"build": "vue-cli-service build",
24+
"build:umd": "vue-cli-service build --target lib --name vuetify-message-box --dest lib src/components/message-box/index.js",
25+
"prepublishOnly": "npm run build:umd",
26+
"test:unit": "vue-cli-service test:unit",
27+
"lint": "vue-cli-service lint"
28+
},
29+
"dependencies": {
30+
"@mdi/font": "^6.9.96",
31+
"core-js": "^3.8.3",
32+
"vue": "^2.6.14",
33+
"vuetify": "^2.6.7"
34+
},
35+
"devDependencies": {
36+
"@vue/cli-plugin-babel": "~5.0.0",
37+
"@vue/cli-plugin-eslint": "~5.0.0",
38+
"@vue/cli-plugin-unit-jest": "~5.0.0",
39+
"@vue/cli-service": "~5.0.0",
40+
"@vue/eslint-config-standard": "^6.1.0",
41+
"@vue/eslint-config-typescript": "^9.1.0",
42+
"@vue/test-utils": "^1.1.3",
43+
"@vue/vue2-jest": "^27.0.0-alpha.2",
44+
"babel-jest": "^27.0.6",
45+
"eslint": "^7.32.0",
46+
"eslint-plugin-import": "^2.25.3",
47+
"eslint-plugin-node": "^11.1.0",
48+
"eslint-plugin-promise": "^5.1.0",
49+
"eslint-plugin-vue": "^8.0.3",
50+
"jest": "^27.0.5",
51+
"vue-template-compiler": "^2.6.14"
52+
},
53+
"license": "MIT"
54+
}

public/favicon.ico

4.19 KB
Binary file not shown.

public/index.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title><%= htmlWebpackPlugin.options.title %></title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
14+
<div id="app"></div>
15+
<!-- built files will be auto injected -->
16+
</body>
17+
</html>

src/assets/logo.png

6.69 KB
Loading

vetur.config.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
settings: {
3+
'vetur.format.defaultFormatterOptions': {
4+
prettier: {
5+
printWidth: 80,
6+
tabWidth: 2,
7+
useTabs: false,
8+
semi: false,
9+
singleQuote: true,
10+
quoteProps: 'as-needed',
11+
jsxSingleQuote: true,
12+
trailingComma: 'none',
13+
bracketSpacing: true,
14+
jsxBracketSameLine: true,
15+
arrowParens: 'always',
16+
requirePragma: false,
17+
insertPragma: false,
18+
proseWrap: 'preserve',
19+
htmlWhitespaceSensitivity: 'ignore',
20+
vueIndentScriptAndStyle: false,
21+
endOfLine: 'lf',
22+
embeddedLanguageFormatting: 'auto'
23+
}
24+
},
25+
'vetur.format.defaultFormatter.js': 'vscode-typescript',
26+
'javascript.format.insertSpaceBeforeFunctionParenthesis': true
27+
}
28+
}

vue.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const { defineConfig } = require('@vue/cli-service')
2+
module.exports = defineConfig({
3+
publicPath: './',
4+
transpileDependencies: true
5+
})

0 commit comments

Comments
 (0)