提交 ae6e49d2 编写于 作者: A aorz

new version

上级 a83a9f83
# Vue.js Contributing Guide
# 贡献
Hi! I’m really excited that you are interested in contributing to Vue.js. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.
> 欢迎任何形式的贡献,我们的开发计划见 [mpvue 开发计划](https://trello.com/b/ZBP1leCF/mpvue)
- [Code of Conduct](https://github.com/vuejs/vue/blob/dev/.github/CODE_OF_CONDUCT.md)
- [Issue Reporting Guidelines](#issue-reporting-guidelines)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Development Setup](#development-setup)
- [Project Structure](#project-structure)
## Issues
## Issue Reporting Guidelines
### 提交 issues
- Always use [https://new-issue.vuejs.org/](https://new-issue.vuejs.org/) to create new issues.
- 确定在最新版本中该 bug 存在。我们将不会持续维护所有的发布版本,所有的修改仅根据当前版本。
- 确认该 bug 是可以复现的,请尽量提供完整的重现步骤。
- 确定这是不是一个 bug,请仔细阅读文档。
- 确定这不是一个重复的 bug。 查看 [Issue Page](https://github.com/Meituan-Dianping/mpvue/issues) 列表,搜索您要提交的 bug 是否已经被报告过。
## Pull Request Guidelines
### 如何提交一个有质量的 bug
- The `master` branch is basically just a snapshot of the latest stable release. All development should be done in dedicated branches. **Do not submit PRs against the `master` branch.**
请在 [Issue Page](https://github.com/Meituan-Dianping/mpvue/issues) 页面中提交 bug。
- Checkout a topic branch from the relevant branch, e.g. `dev`, and merge back against that branch.
- 使用一个清晰并有描述性的标题来定义bug。
- 详细的描述复现bug的步骤。包括您使用的 mpvue、mpvue-loader、mpvue-template-compiler 版本,配置情况,预计产生的结果,实际产生的结果。
- 如果程序抛出异常,请附加完整的堆栈日志。
- 如有可能,请附上屏幕截图或动态的 GIF 图,这些图片能帮助演示整个问题的产生过程。
- Work in the `src` folder and **DO NOT** checkin `dist` in the commits.
### 提交功能增强建议
- It's OK to have multiple small commits as you work on the PR - we will let GitHub automatically squash it before merging.
请在 [Issue Page](https://github.com/Meituan-Dianping/mpvue/issues) 页面中提交增强建议。
- Make sure `npm test` passes. (see [development setup](#development-setup))
- 请确定这不是一个重复的功能增强建议。 查看 [Issue Page](https://github.com/Meituan-Dianping/mpvue/issues) 列表,搜索您要提交的功能增强建议是否已经被提交过。
- 使用一个清晰并有描述性的标题来定义增强建议。
- 详细描述增强功能的行为模式。
- 解释说明为什么该功能是对大多数用户是有用的。新功能应该具有广泛的适用性。
- 如有可能,可以列出其他数据库中间已经具备的类似功能。商用与开源软件均可。
- 使用 enhancement 标签(Label)来标记这个 issue。
- If adding new feature:
- Add accompanying test case.
- Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it.
- If fixing a bug:
- If you are resolving a special issue, add `(fix #xxxx[,#xxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`.
- Provide detailed description of the bug in the PR. Live demo preferred.
- Add appropriate test coverage if applicable.
## Development Setup
You will need [Node.js](http://nodejs.org) **version 6+** and [Java Runtime Environment](http://www.oracle.com/technetwork/java/javase/downloads/index.html) (needed for running Selenium server during e2e tests).
After cloning the repo, run:
``` bash
$ npm install
& npm run setup
```
The `setup` script links two git hooks:
- `pre-commit`: runs ESLint on staged files.
- `commit-msg`: validates commit message format (see below).
### Commiting Changes
Commit messages should follow the [commit message convention](./COMMIT_CONVENTION.md) so that changelogs can be automatically generated. If git hooks have been properly linked, commit messages will be automatically validated upon commit. It is recommended to use `npm run commit` instead of `git commit`, which provides an interactive CLI for generating proper commit messages.
### Commonly used NPM scripts
``` bash
# watch and auto re-build dist/vue.js
$ npm run dev
# watch and auto re-run unit tests in Chrome
$ npm run dev:test
# build all dist files, including npm packages
$ npm run build
# run the full test suite, include linting / type checking
$ npm test
```
There are some other scripts available in the `scripts` section of the `package.json` file.
The default test script will do the following: lint with ESLint -> type check with Flow -> unit tests with coverage -> e2e tests. **Please make sure to have this pass successfully before submitting a PR.** Although the same tests will be run against your PR on the CI server, it is better to have it working locally beforehand.
## Project Structure
- **`build`**: contains build-related configuration files. In most cases you don't need to touch them. However, it would be helpful to familiarize yourself with the following files:
- `build/alias.js`: module import aliases used across all source code and tests.
- `build/config.js`: contains the build configurations for all files found in `dist/`. Check this file if you want to find out the entry source file for a dist file.
- **`dist`**: contains built files for distribution. Note this directory is only updated when a release happens; they do not reflect the latest changes in development branches.
See [dist/README.md](https://github.com/vuejs/vue/blob/dev/dist/README.md) for more details on dist files.
- **`flow`**: contains type declarations for [Flow](https://flowtype.org/). These declarations are loaded **globally** and you will see them used in type annotations in normal source code.
- **`packages`**: contains `vue-server-renderer` and `vue-template-compiler`, which are distributed as separate NPM packages. They are automatically generated from the source code and always have the same version with the main `vue` package.
- **`test`**: contains all tests. The unit tests are written with [Jasmine](http://jasmine.github.io/2.3/introduction.html) and run with [Karma](http://karma-runner.github.io/0.13/index.html). The e2e tests are written for and run with [Nightwatch.js](http://nightwatchjs.org/).
- **`src`**: contains the source code, obviously. The codebase is written in ES2015 with [Flow](https://flowtype.org/) type annotations.
- **`compiler`**: contains code for the template-to-render-function compiler.
The compiler consists of a parser (converts template strings to element ASTs), an optimizer (detects static trees for vdom render optimization), and a code generator (generate render function code from element ASTs). Note the codegen directly generates code strings from the element AST - it's done this way for smaller code size because the compiler is shipped to the browser in the standalone build.
- **`core`**: contains universal, platform-agnostic runtime code.
The Vue 2.0 core is platform-agnostic - which means code inside `core` should be able to run in any JavaScript environment, be it the browser, Node.js, or an embedded JavaScript runtime in native applications.
- **`observer`**: contains code related to the reactivity system.
- **`vdom`**: contains code related to vdom element creation and patching.
- **`instance`**: contains Vue instance constructor and prototype methods.
- **`global-api`**: as the name suggests.
- **`components`**: universal abstract components. Currently `keep-alive` is the only one.
- **`server`**: contains code related to server-side rendering.
- **`platforms`**: contains platform-specific code.
Entry files for dist builds are located in their respective platform directory.
Each platform module contains three parts: `compiler`, `runtime` and `server`, corresponding to the three directories above. Each part contains platform-specific modules/utilities which are then imported and injected to the core counterparts in platform-specific entry files. For example, the code implementing the logic behind `v-bind:class` is in `platforms/web/runtime/modules/class.js` - which is imported in `entries/web-runtime.js` and used to create the browser-specific vdom patching function.
- **`sfc`**: contains single-file component (`*.vue` files) parsing logic. This is used in the `vue-template-compiler` package.
- **`shared`**: contains utilities shared across the entire codebase.
### 贡献补丁
- fork 本仓库到自己账户。
- 您应该新建一个分支来开始您的工作,分支的名字为功能名称/issueId。
- 完成功能后请添加完整测试。
- 完成后,发送一个 pull request 到 Meituan-Dianping/mpvue。
- 等待核心开发者做 CodeReview。
- 最后,恭喜您已经成为了 mpvue 的官方贡献者!
<!--
IMPORTANT: Please use the following link to create a new issue:
# [问题简单描述]
https://new-issue.vuejs.org/
**问题复现步骤:**
If your issue was not created using the app above, it will be closed immediately.
1. [第一步]
2. [第二步]
3. [其他步骤...]
中文用户请注意:
请使用上面的链接来创建新的 issue。如果不是用上述工具创建的 issue 会被自动关闭。
-->
**期望的表现:**
[在这里描述期望的表现]
**观察到的表现:**
[在这里描述观察到的表现]
**屏幕截图和动态 GIF 图**
![复现步骤的屏幕截图和动态 GIF 图](图片的 url)
\ No newline at end of file
<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
-->
<!-- PULL REQUEST TEMPLATE -->
<!-- (Update "[ ]" to "[x]" to check a box) -->
......@@ -26,7 +21,7 @@ If yes, please describe the impact and migration path for existing applications:
- [ ] It's submitted to the `dev` branch for v2.x (or to a previous version branch), _not_ the `master` branch
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
- [ ] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
- [ ] All tests are passing
- [ ] New/updated tests are included
If adding a **new feature**, the PR's description includes:
......
# mpvue
> Vue.js in mini program
# mpvue
> Vue.js 小程序版, fork 自 [vuejs/vue@2.4.1](https://github.com/vuejs/vue),保留了 vue runtime 能力,添加了小程序平台的支持。
![npm version](https://img.shields.io/npm/v/mpvue.svg?style=flat)
<img src="http://mpvue.com/assets/logo.png" width="80">
`mpvue` 是一个使用 [Vue.js](https://vuejs.org) 开发小程序的前端框架。框架基于 `Vue.js` 核心,`mpvue` 修改了 `Vue.js` 的 runtime 和 compiler 实现,使其可以运行在小程序环境中,从而为小程序开发引入了整套 `Vue.js` 开发体验。
## 文档
[mpvue 文档](http://mpvue.com)
## 实践案例
美团旗下小程序:`美团汽车票``美团充电`,此外,正有一大批小程序正在接入中。
......@@ -51,4 +57,8 @@
- [mpvue-simple](http://mpvue.com/mpvue/simple) 辅助 mpvue 快速开发 Page / Component 级小程序页面的工具
- 其它
[贡献方法](./.github/CONTRIBUTING.md)
[使用 mpvue 的项目征集](https://github.com/Meituan-Dianping/mpvue/issues/21)
[分享交流群](https://github.com/Meituan-Dianping/mpvue/issues/14)
{
"name": "mpvue-template-compiler",
"version": "1.0.1",
"version": "1.0.2",
"description": "mpvue template compiler for Vue",
"main": "index.js",
"repository": {
......
......@@ -4144,7 +4144,8 @@ Object.defineProperty(Vue$3.prototype, '$ssrContext', {
}
});
Vue$3.version = '1.0.1';
Vue$3.version = '2.4.1';
Vue$3.mpvueVersion = '1.0.2';
/* globals renderer */
......
{
"name": "mpvue",
"version": "1.0.1",
"version": "1.0.2",
"description": "Vue Runtime for mini program",
"main": "index.js",
"repository": {
......
......@@ -16,5 +16,6 @@ Object.defineProperty(Vue.prototype, '$ssrContext', {
})
Vue.version = '__VERSION__'
Vue.mpvueVersion = '__MPVUE_VERSION__'
export default Vue
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册