Skip to content

Commit 3884b15

Browse files
committed
chore: readme
1 parent e0913e0 commit 3884b15

File tree

5 files changed

+200
-30
lines changed

5 files changed

+200
-30
lines changed

.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/blob/master/packages/conventional-changelog-angular/convention.md).
4+
5+
#### TL;DR:
6+
7+
Messages must be matched by the following regex:
8+
9+
``` js
10+
/^(revert: )?(feat|fix|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 place of the commit change. For example `core`, `compiler`, `ssr`, `v-model`, `transition` etc...
72+
73+
### Subject
74+
75+
The subject contains succinct description of the change:
76+
77+
* use the imperative, present tense: "change" not "changed" nor "changes"
78+
* don't capitalize 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.

.github/CONTRIBUTING.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## Development Setup
2+
3+
This project uses a monorepo setup that requires using [Yarn](https://yarnpkg.com) because it relies on [Yarn workspaces](https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/).
4+
5+
``` sh
6+
# install dependencies
7+
yarn
8+
9+
# link `vue` executable
10+
# if you have the old vue-cli installed globally, you may
11+
# need to uninstall it first.
12+
cd packages/@vue/cli
13+
yarn link
14+
15+
# create test projects in /packages/test
16+
cd -
17+
cd packages/test
18+
vue create test-app
19+
cd test-app
20+
yarn serve
21+
```
22+
23+
### Testing Tips
24+
25+
The full test suite is rather slow, because it has a number of e2e tests that perform full webpack builds of actual projects. To narrow down the tests needed to run during development, you can pass a list of packages to the `test` script:
26+
27+
``` sh
28+
yarn test cli cli-services
29+
```
30+
31+
If the package is a plugin, you can ommit the `cli-plugin-` prefix:
32+
33+
``` sh
34+
yarn test typescript
35+
```
36+
37+
To further narrow down tests, you can also specify your own regex:
38+
39+
``` sh
40+
yarn test -g <filenameRegex>
41+
```
42+
43+
You can also pass `--watch` to run tests in watch mode.
44+
45+
Note that `jest --onlyChanged` isn't always accurate because some tests spawn child processes.
46+
47+
### Plugin Development
48+
49+
See [dedicated section in docs](https://github.com/vuejs/vue-cli/tree/dev/docs/Plugin.md).

.github/ISSUE_TEMPLATE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!--
2+
IMPORTANT: Please use the following link to create a new issue:
3+
4+
https://new-issue.vuejs.org/?repo=vuejs/vue-cli
5+
6+
If your issue was not created using the app above, it will be closed immediately.
7+
8+
中文用户请注意:
9+
请使用上面的链接来创建新的 issue。如果不是用上述工具创建的 issue 会被自动关闭。
10+
-->

README.md

Lines changed: 49 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,73 @@
11
# vue-cli [![Build Status](https://circleci.com/gh/vuejs/vue-cli/tree/dev.svg?style=shield)](https://circleci.com/gh/vuejs/vue-cli/tree/dev) [![Windows Build status](https://ci.appveyor.com/api/projects/status/487fqt71e4kf46iv/branch/dev?svg=true)](https://ci.appveyor.com/project/yyx990803/vue-cli-6b0a6/branch/dev)
22

3-
> WIP: this is the work in progress branch of the upcoming vue-cli 3.0.
4-
> Only for preview for template maintainers.
3+
> This is the branch for `@vue/cli` 3.0.
54
6-
## Development Setup
5+
**Status: alpha**
76

8-
This project uses a monorepo setup that requires using [Yarn](https://yarnpkg.com) because it relies on [Yarn workspaces](https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/).
7+
## Install
98

109
``` sh
11-
# install dependencies
12-
yarn
13-
14-
# link `vue` executable
15-
# if you have the old vue-cli installed globally, you may
16-
# need to uninstall it first.
17-
cd packages/@vue/cli
18-
yarn link
19-
20-
# create test projects in /packages/test
21-
cd -
22-
cd packages/test
23-
vue create test-app
24-
cd test-app
25-
yarn serve
10+
npm install -g @vue/cli
11+
# or
12+
yarn global add @vue/cli
2613
```
2714

28-
### Testing Tips
15+
## Usage
2916

30-
The full test suite is rather slow, because it has a number of e2e tests that perform full webpack builds of actual projects. To narrow down the tests needed to run during development, you can pass a list of packages to the `test` script:
17+
#### Creating a New Project
3118

3219
``` sh
33-
yarn test cli cli-services
20+
vue create my-project
3421
```
3522

36-
If the package is a plugin, you can ommit the `cli-plugin-` prefix:
23+
#### Zero-config Prototyping
24+
25+
You can rapidly prototype with just a single `*.vue` file with the `vue serve` and `vue build` commands, but they require an additional global addon to be installed:
26+
27+
``` sh
28+
yarn global add @vue/cli-service-global
29+
echo '<template><h1>Hello!</h1></template>' > App.vue
30+
vue serve
31+
```
32+
33+
`vue serve` uses the same default setup (webpack, babel, postcss & eslint) as projects created by `vue create`. It automatically infers the entry file in the current directory - the entry can be one of `main.js`, `index.js`, `App.vue` or `app.vue`. If needed, you can also provide an `index.html`, install and use local dependencies, or even configure babel, postcss & eslint with corresponding config files.
34+
35+
The drawback of `vue serve` is that it relies on globally installed dependencies which may be inconsistent on different machines. Therefore this is only recommended for rapid prototyping.
36+
37+
#### Installing Plugins in an Existing Project
38+
39+
Each CLI plugin ships with a generator (which creates files) and a runtime plugin (which tweaks the core webpack config and injects commands). When you use `vue create` to create a new project, some plugins will be pre-installed for you based on your feature selection. In case you want to install a plugin into an already created project, simply install it first:
3740

3841
``` sh
39-
yarn test typescript
42+
yarn add @vue/cli-plugin-eslint
4043
```
4144

42-
To further narrow down tests, you can also specify your own regex:
45+
Then you can invoke the plugin's generator so it generates files into your project:
4346

4447
``` sh
45-
yarn test -g <filenameRegex>
48+
vue invoke eslint # the prefix can be omitted
4649
```
4750

48-
You can also pass `--watch` to run tests in watch mode.
51+
It is recommended to commit your project's current state before running `vue invoke`, so that after file generation you can review the changes and revert if needed.
52+
53+
#### Pulling `[email protected]` Templates (Legacy)
54+
55+
`@vue/cli` uses the same `vue` binary, so it overwrites `[email protected]`. If you still need the legacy `vue init` functionality, you can install a global bridge:
56+
57+
``` sh
58+
yarn global add @vue/cli-init
59+
# vue init now works exactly the same as [email protected]
60+
vue init webpack my-project
61+
```
62+
63+
#### Customization and Plugin Usage
64+
65+
For a detailed guide on how to customize a project, recipes for common tasks, detailed usage for each plugin, please see the [full documentation](https://github.com/vuejs/vue-cli/blob/dev/docs/README.md).
66+
67+
## Contributing
4968

50-
Note that `jest --onlyChanged` isn't always accurate because some tests spawn child processes.
69+
Please see [contributing guide](https://github.com/vuejs/vue-cli/blob/dev/.github/CONTRIBUTING.md).
5170

52-
### Plugin Development
71+
## License
5372

54-
See [dedicated section in docs](https://github.com/vuejs/vue-cli/tree/dev/docs/Plugin.md).
73+
MIT

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# WIP

0 commit comments

Comments
 (0)