diff --git a/.npmignore b/.npmignore new file mode 100644 index 000000000..d5ff25078 --- /dev/null +++ b/.npmignore @@ -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 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..596019e07 --- /dev/null +++ b/.travis.yml @@ -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= diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..49a49a361 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,82 @@ +# 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. + +## 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, don’t 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 don’t 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 don’t 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 don’t check in the Gruntfile for the commit. diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..17a9b2f1f --- /dev/null +++ b/LICENSE @@ -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. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 000000000..c43e786ce --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +
+ +# Vue.js [](https://travis-ci.org/yyx990803/vue) [](https://saucelabs.com/u/vuejs) [](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 +