more files

This commit is contained in:
Evan You 2014-07-08 18:35:39 -04:00
parent 63b7397be2
commit c225f8c3b8
12 changed files with 280 additions and 1 deletions

15
.npmignore Normal file
View File

@ -0,0 +1,15 @@
test
tasks
examples
explorations
components
.jshintrc
.gitignore
.travis.yml
.npmignore
bower.json
component.json
gruntfile.js
TODO.md
sauce_connect.log
coverage

12
.travis.yml Normal file
View File

@ -0,0 +1,12 @@
language: node_js
node_js:
- '0.10'
branches:
only:
- master
before_install:
- npm install -g grunt-cli phantomjs casperjs
env:
global:
- secure: Ce9jxsESszOnGyj3A6wILO5W412El9iD/HCHiFgbr8/cSXa4Yt0ZOEZysZeyaBX6IFUCjHtQPLasVgCxijDHrhi7/drmyCE+ksruk/6LJWn9C46PZK6nI+N04iYA2TRnocFllhGbyttpbpxY04smCmGWqXwLppu9nb+VIDkKGmE=
- secure: cZQTby8mGxb4QHi9net2/kK7N2VMOZKPepa+8ob2+jxICSukPgTqGP1iVQWR+tVlU60lFAHpos2o8vQLB4e5Rt5IFEajCr+RppE9xUWxMUulbrXaIrzz1OYA5DvTi/8ZeE6/x0+MpZJT1b/GIqhlrU4QwjjpeJWLwAkv8ysZaEs=

82
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,82 @@
# Vue.js Contributing Guide
Hi! Im 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.
## Issue Reporting Checklist
- Make sure that you are using the latest version of Vue.
- Try to search for your issue, it may have already been answered or even fixed in the development branch.
- It is recommended that you make a JSFiddle to reproduce your issue. You could start with [this template](http://jsfiddle.net/5sH6A/) that already includes the latest version of Vue.
- If your issue is resolved but still open, dont hesitate to close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it.
## Pull Request Checklist
- Checkout a topic branch from `dev` and merge back against `dev`.
- Work in the `src` folder and **DO NOT** checkin `dist` in the commits.
- Squash the commit if there are too many small ones.
- Follow the [code style](#code-style).
- Make sure the default grunt task passes. (see [development setup](#development-setup))
- 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:
- Provide detailed description of the bug in the PR. Live demo preferred.
- Add appropriate test coverage if applicable.
## Code Style
- [No semicolons unless necessary](http://inimino.org/~inimino/blog/javascript_semicolons).
- 2 spaces indentation.
- multiple var declarations.
- align equal signs where possible.
- Return early in one line if possible.
- When in doubt, read the source code.
- Break long ternary conditionals like this:
``` js
var a = superLongConditionalStatement
? 'yep'
: 'nope'
```
## Development Setup
You will need [Node](http://nodejs.org), [Grunt](http://gruntjs.com), [PhantomJS](http://phantomjs.org) and [CasperJS](http://casperjs.org).
``` bash
# in case you dont already these:
# npm install -g grunt-cli phantomjs casperjs
$ npm install
```
To watch and auto-build `dist/vue.js` during development:
``` bash
$ grunt watch
```
To lint:
``` bash
grunt jshint
```
To build:
``` bash
$ grunt build
```
To test:
``` bash
# if you dont have these yet:
# npm install -g phantomjs casperjs
$ grunt test
```
The unit tests are written with Jasmine and run with Karma. The functional tests are written for and run with CasperJS.
**If you are not using a Mac**
You can modify the Gruntfile to only run Karma tests in browsers that are available on your system. Just make sure dont check in the Gruntfile for the commit.

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2013 Yuxi Evan You
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

61
README.md Normal file
View File

@ -0,0 +1,61 @@
<p align="center"><a href="http://vuejs.org" target="_blank"><img width="100"src="http://vuejs.org/images/logo.png"></a></p>
# Vue.js [![Build Status](https://travis-ci.org/yyx990803/vue.svg?branch=master)](https://travis-ci.org/yyx990803/vue) [![Selenium Test Status](https://saucelabs.com/buildstatus/vuejs)](https://saucelabs.com/u/vuejs) [![Coverage Status](https://img.shields.io/coveralls/yyx990803/vue.svg)](https://coveralls.io/r/yyx990803/vue?branch=master)
> MVVM made simple.
## Introduction
Vue.js is a library for building interactive web interfaces. It provides the benefits of MVVM data binding and a composable component system with a simple and flexible API. You should try it out if you like:
- Intuitive API that simply makes sense
- Extendable Data bindings
- Plain JavaScript objects as models
- Building interface by composing reusable components
- Flexibility to mix & match the view layer with other libraries
It's really really easy to get started. Seriously, it's so easy:
``` html
<div id="demo">
{{message}}
<input v-model="message">
</div>
```
``` js
var demo = new Vue({
data: {
message: 'Hello Vue.js!'
}
}).$mount('#demo')
```
To check out the live demo, guides and API reference, visit [vuejs.org](http://vuejs.org).
## Browser Support
Vue.js supports [most ECMAScript 5 compliant browsers](https://saucelabs.com/u/vuejs), essentially IE9+. IE8 and below are not supported.
## Contribution
Read the [contributing guide](https://github.com/yyx990803/vue/blob/master/CONTRIBUTING.md).
## Get in Touch
- General, non source-code related questions: check the [FAQ](https://github.com/yyx990803/vue/wiki/FAQ) first, if it's not addressed in there, ask [here](https://github.com/vuejs/Discussion/issues).
- If you have a Vue-related project/component/tool, add it to [this list](https://github.com/yyx990803/vue/wiki/User-Contributed-Components-&-Tools)!
- Bugs, suggestions & feature requests: [open an issue](https://github.com/yyx990803/vue/issues)
- Twitter: [@vuejs](https://twitter.com/vuejs)
- [Google+ Community](https://plus.google.com/communities/112229843610661683911)
- freenode IRC Channel: #vuejs
## Changelog
See details changes for each version in the [release notes](https://github.com/yyx990803/vue/releases).
## License
[MIT](http://opensource.org/licenses/MIT)
Copyright (c) 2014 Evan You

17
bower.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "vue",
"version": "0.11.0",
"main": "dist/vue.js",
"description": "Simple, Fast & Composable MVVM for building interative interfaces",
"authors": ["Evan You <yyx990803@gmail.com>"],
"license": "MIT",
"ignore": [
".*",
"examples",
"test",
"tasks",
"gruntfile.js",
"*.json",
"*.md"
]
}

43
component.json Normal file
View File

@ -0,0 +1,43 @@
{
"name": "vue",
"version": "0.11.0",
"main": "src/main.js",
"author": "Evan You <yyx990803@gmail.com>",
"description": "Simple, Fast & Composable MVVM for building interative interfaces",
"keywords": [
"mvvm",
"framework",
"data binding"
],
"license": "MIT",
"scripts": [
"src/api/asset-register.js",
"src/api/config.js",
"src/api/extend.js",
"src/api/require.js",
"src/api/use.js",
"src/batcher.js",
"src/binding.js",
"src/compiler/compiler.js",
"src/config.js",
"src/directive.js",
"src/emitter.js",
"src/instance/data.js",
"src/instance/dom.js",
"src/instance/events.js",
"src/instance/lifecycle.js",
"src/observer/observer.js",
"src/observer/watch-array.js",
"src/observer/watch-object.js",
"src/parsers/directive.js",
"src/parsers/expression.js",
"src/parsers/path.js",
"src/parsers/template.js",
"src/parsers/text.js",
"src/transition/css.js",
"src/transition/js.js",
"src/transition/transition.js",
"src/util.js",
"src/vue.js"
]
}

View File

@ -61,10 +61,16 @@ module.exports = function (grunt) {
})
// load npm tasks
grunt.loadNpmTasks('grunt-contrib-jshint')
grunt.loadNpmTasks('grunt-karma')
grunt.loadNpmTasks('grunt-browserify')
// load custom tasks
grunt.file.recurse('tasks', function (path) {
require('./' + path)(grunt)
})
grunt.registerTask('unit', ['karma:browsers'])
grunt.registerTask('watch', ['browserify:watch'])
grunt.registerTask('build', ['browserify:build'])

View File

@ -1,6 +1,6 @@
{
"name": "vue",
"version": "0.10.5",
"version": "0.11.0",
"author": "Evan You <yyx990803@gmail.com>",
"license": "MIT",
"description": "Simple, Fast & Composable MVVM for building interative interfaces",

3
tasks/casper.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = function () {
}

16
tasks/component.js Normal file
View File

@ -0,0 +1,16 @@
// automatically fill in component.json's script field
module.exports = function (grunt) {
grunt.registerTask('component', function () {
var component = grunt.file.readJSON('component.json')
component.scripts = []
grunt.file.recurse('src', function (file) {
component.scripts.push(file)
})
grunt.file.write('component.json', JSON.stringify(component, null, 2))
})
}

3
tasks/release.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = function () {
}