Skip to content

Commit c6d3f66

Browse files
committed
chore: vue init
1 parent 3767abc commit c6d3f66

File tree

529 files changed

+96988
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

529 files changed

+96988
-0
lines changed

.babelrc.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const babelPresetFlowVue = {
2+
plugins: [
3+
require('@babel/plugin-proposal-class-properties'),
4+
// require('@babel/plugin-syntax-flow'), // not needed, included in transform-flow-strip-types
5+
require('@babel/plugin-transform-flow-strip-types')
6+
]
7+
}
8+
9+
module.exports = {
10+
presets: [
11+
require('@babel/preset-env'),
12+
// require('babel-preset-flow-vue')
13+
babelPresetFlowVue
14+
],
15+
plugins: [
16+
require('babel-plugin-transform-vue-jsx'),
17+
require('@babel/plugin-syntax-dynamic-import')
18+
],
19+
ignore: [
20+
'dist/*.js',
21+
'packages/**/*.js'
22+
]
23+
}

.circleci/config.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
version: 2
2+
3+
defaults: &defaults
4+
working_directory: ~/project/vue
5+
docker:
6+
- image: vuejs/ci
7+
8+
jobs:
9+
install:
10+
<<: *defaults
11+
steps:
12+
- checkout
13+
- restore_cache:
14+
keys:
15+
- v1-vue-{{ .Branch }}-{{ checksum "yarn.lock" }}
16+
- v1-vue-{{ .Branch }}-
17+
- v1-vue-
18+
- run: npm install
19+
- save_cache:
20+
key: v1-vue-{{ .Branch }}-{{ checksum "yarn.lock" }}
21+
paths:
22+
- node_modules/
23+
- persist_to_workspace:
24+
root: ~/project
25+
paths:
26+
- vue
27+
28+
lint-flow-types:
29+
<<: *defaults
30+
steps:
31+
- attach_workspace:
32+
at: ~/project
33+
- run: npm run lint
34+
- run: npm run flow
35+
- run: npm run test:types
36+
37+
test-cover:
38+
<<: *defaults
39+
steps:
40+
- attach_workspace:
41+
at: ~/project
42+
- run: npm run test:cover
43+
- run:
44+
name: report coverage stats for non-PRs
45+
command: |
46+
if [[ -z $CI_PULL_REQUEST ]]; then
47+
./node_modules/.bin/codecov
48+
fi
49+
50+
test-e2e:
51+
<<: *defaults
52+
steps:
53+
- attach_workspace:
54+
at: ~/project
55+
- run: npm run test:e2e -- --env phantomjs
56+
57+
test-ssr-weex:
58+
<<: *defaults
59+
steps:
60+
- attach_workspace:
61+
at: ~/project
62+
- run: npm run test:ssr
63+
- run: npm run test:weex
64+
65+
trigger-regression-test:
66+
<<: *defaults
67+
steps:
68+
- run:
69+
command: |
70+
curl --user ${CIRCLE_TOKEN}: \
71+
--data build_parameters[CIRCLE_JOB]=update \
72+
--data build_parameters[VUE_REVISION]=${CIRCLE_SHA1} \
73+
https://circleci.com/api/v1.1/project/github/vuejs/regression-testing/tree/master
74+
75+
workflows:
76+
version: 2
77+
install-and-parallel-test:
78+
jobs:
79+
- install
80+
- test-cover:
81+
requires:
82+
- install
83+
- lint-flow-types:
84+
requires:
85+
- install
86+
- test-e2e:
87+
requires:
88+
- install
89+
- test-ssr-weex:
90+
requires:
91+
- install
92+
- trigger-regression-test:
93+
filters:
94+
branches:
95+
only:
96+
- "2.6"
97+
- regression-test
98+
requires:
99+
- test-cover
100+
- lint-flow-types
101+
- test-e2e
102+
- test-ssr-weex
103+
weekly_regression_test:
104+
triggers:
105+
- schedule:
106+
# At 13:00 UTC (9:00 EDT) on every Monday
107+
cron: "0 13 * * 1"
108+
filters:
109+
branches:
110+
only:
111+
dev
112+
jobs:
113+
- install
114+
- test-cover:
115+
requires:
116+
- install
117+
- lint-flow-types:
118+
requires:
119+
- install
120+
- test-e2e:
121+
requires:
122+
- install
123+
- test-ssr-weex:
124+
requires:
125+
- install
126+
- trigger-regression-test:
127+
requires:
128+
- test-cover
129+
- lint-flow-types
130+
- test-e2e
131+
- test-ssr-weex

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
insert_final_newline = false
15+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
flow
2+
dist
3+
packages

.eslintrc.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module.exports = {
2+
root: true,
3+
parserOptions: {
4+
parser: require.resolve('babel-eslint'),
5+
ecmaVersion: 2018,
6+
sourceType: 'module'
7+
},
8+
env: {
9+
es6: true,
10+
node: true,
11+
browser: true
12+
},
13+
plugins: [
14+
"flowtype"
15+
],
16+
extends: [
17+
"eslint:recommended",
18+
"plugin:flowtype/recommended"
19+
],
20+
globals: {
21+
"__WEEX__": true,
22+
"WXEnvironment": true
23+
},
24+
rules: {
25+
'no-console': process.env.NODE_ENV !== 'production' ? 0 : 2,
26+
'no-useless-escape': 0,
27+
'no-empty': 0
28+
}
29+
}

.flowconfig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[ignore]
2+
.*/node_modules/.*
3+
.*/test/.*
4+
.*/scripts/.*
5+
.*/examples/.*
6+
.*/benchmarks/.*
7+
8+
[include]
9+
10+
[libs]
11+
flow
12+
13+
[options]
14+
unsafe.enable_getters_and_setters=true
15+
module.name_mapper='^compiler/\(.*\)$' -> '<PROJECT_ROOT>/src/compiler/\1'
16+
module.name_mapper='^core/\(.*\)$' -> '<PROJECT_ROOT>/src/core/\1'
17+
module.name_mapper='^shared/\(.*\)$' -> '<PROJECT_ROOT>/src/shared/\1'
18+
module.name_mapper='^web/\(.*\)$' -> '<PROJECT_ROOT>/src/platforms/web/\1'
19+
module.name_mapper='^weex/\(.*\)$' -> '<PROJECT_ROOT>/src/platforms/weex/\1'
20+
module.name_mapper='^server/\(.*\)$' -> '<PROJECT_ROOT>/src/server/\1'
21+
module.name_mapper='^entries/\(.*\)$' -> '<PROJECT_ROOT>/src/entries/\1'
22+
module.name_mapper='^sfc/\(.*\)$' -> '<PROJECT_ROOT>/src/sfc/\1'
23+
suppress_comment= \\(.\\|\n\\)*\\$flow-disable-line

.github/CODE_OF_CONDUCT.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4+
5+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of the level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6+
7+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8+
9+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10+
11+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12+
13+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)

.github/COMMIT_CONVENTION.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
## Git Commit Message Convention
2+
3+
> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
4+
5+
#### TL;DR:
6+
7+
Messages must be matched by the following regex:
8+
9+
``` js
10+
/^(revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/
11+
```
12+
13+
#### Examples
14+
15+
Appears under "Features" header, `compiler` subheader:
16+
17+
```
18+
feat(compiler): add 'comments' option
19+
```
20+
21+
Appears under "Bug Fixes" header, `v-model` subheader, with a link to issue #28:
22+
23+
```
24+
fix(v-model): handle events on blur
25+
26+
close #28
27+
```
28+
29+
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
30+
31+
```
32+
perf(core): improve vdom diffing by removing 'foo' option
33+
34+
BREAKING CHANGE: The 'foo' option has been removed.
35+
```
36+
37+
The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.
38+
39+
```
40+
revert: feat(compiler): add 'comments' option
41+
42+
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
43+
```
44+
45+
### Full Message Format
46+
47+
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
48+
49+
```
50+
<type>(<scope>): <subject>
51+
<BLANK LINE>
52+
<body>
53+
<BLANK LINE>
54+
<footer>
55+
```
56+
57+
The **header** is mandatory and the **scope** of the header is optional.
58+
59+
### Revert
60+
61+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
62+
63+
### Type
64+
65+
If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.
66+
67+
Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks.
68+
69+
### Scope
70+
71+
The scope could be anything specifying the place of the commit change. For example `core`, `compiler`, `ssr`, `v-model`, `transition` etc...
72+
73+
### Subject
74+
75+
The subject contains a succinct description of the change:
76+
77+
* use the imperative, present tense: "change" not "changed" nor "changes"
78+
* don't capitalize the first letter
79+
* no dot (.) at the end
80+
81+
### Body
82+
83+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
84+
The body should include the motivation for the change and contrast this with previous behavior.
85+
86+
### Footer
87+
88+
The footer should contain any information about **Breaking Changes** and is also the place to
89+
reference GitHub issues that this commit **Closes**.
90+
91+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

0 commit comments

Comments
 (0)