mirror of https://github.com/vuejs/vue.git
0.6.0 - rename to VueJS
This commit is contained in:
parent
cdd07162e1
commit
218557cdec
|
|
@ -3,5 +3,5 @@
|
|||
node_modules
|
||||
components
|
||||
explorations
|
||||
test/seed.test.js
|
||||
test/seed.test-cov.js
|
||||
test/vue.test.js
|
||||
test/vue.test-cov.js
|
||||
|
|
@ -6,6 +6,9 @@ components
|
|||
node_modules
|
||||
.jshintrc
|
||||
.gitignore
|
||||
.travis.yml
|
||||
.sass-cache
|
||||
.npmignore
|
||||
bower.json
|
||||
component.json
|
||||
Gruntfile.js
|
||||
|
|
|
|||
22
README.md
22
README.md
|
|
@ -1,8 +1,8 @@
|
|||
# Seed.js
|
||||
# VueJS
|
||||
|
||||
Modular & Lightweight JavaScript MVVM
|
||||
Data-driven, modular & lightweight ViewModels
|
||||
|
||||
[](https://travis-ci.org/yyx990803/seed)
|
||||
[](https://travis-ci.org/yyx990803/vue)
|
||||
|
||||
## Features
|
||||
|
||||
|
|
@ -27,15 +27,15 @@ Modular & Lightweight JavaScript MVVM
|
|||
|
||||
**Component**
|
||||
|
||||
$ component install yyx990803/seed
|
||||
$ component install yyx990803/vue
|
||||
|
||||
**Browserify**
|
||||
|
||||
$ npm install seed-mvvm
|
||||
$ npm install vue
|
||||
|
||||
**Bower**
|
||||
|
||||
$ bower install seed
|
||||
$ bower install vue
|
||||
|
||||
**Module Loaders, e.g. RequireJS, SeaJS**
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ Built versions in `/dist` or installed via Bower can be used directly as a Commo
|
|||
|
||||
**Standalone**
|
||||
|
||||
Simply include a built version in `/dist` or installed via Bower with a script tag. `seed` will be registered as a global variable.
|
||||
Simply include a built version in `/dist` or installed via Bower with a script tag. `Vue` will be registered as a global variable.
|
||||
|
||||
## Development
|
||||
|
||||
|
|
@ -74,20 +74,20 @@ $ grunt test
|
|||
**HTML**
|
||||
|
||||
~~~ html
|
||||
<div id="demo" sd-on="click:changeText">
|
||||
<p sd-text="hello"></p>
|
||||
<div id="demo" v-on="click:changeText">
|
||||
<p v-text="hello"></p>
|
||||
</div>
|
||||
~~~
|
||||
|
||||
**JavaScript**
|
||||
|
||||
~~~ js
|
||||
new Seed({
|
||||
new Vue({
|
||||
el: '#demo',
|
||||
scope: {
|
||||
hello: 'Hello World!',
|
||||
changeText: function () {
|
||||
this.hello = 'Hello Seed!'
|
||||
this.hello = 'Hello VueJS!'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -200,23 +200,8 @@ require.relative = function(parent) {
|
|||
|
||||
return localRequire;
|
||||
};
|
||||
require.register("component-indexof/index.js", function(exports, require, module){
|
||||
module.exports = function(arr, obj){
|
||||
if (arr.indexOf) return arr.indexOf(obj);
|
||||
for (var i = 0; i < arr.length; ++i) {
|
||||
if (arr[i] === obj) return i;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
});
|
||||
require.register("component-emitter/index.js", function(exports, require, module){
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
var index = require('indexof');
|
||||
|
||||
/**
|
||||
* Expose `Emitter`.
|
||||
*/
|
||||
|
|
@ -257,7 +242,8 @@ function mixin(obj) {
|
|||
* @api public
|
||||
*/
|
||||
|
||||
Emitter.prototype.on = function(event, fn){
|
||||
Emitter.prototype.on =
|
||||
Emitter.prototype.addEventListener = function(event, fn){
|
||||
this._callbacks = this._callbacks || {};
|
||||
(this._callbacks[event] = this._callbacks[event] || [])
|
||||
.push(fn);
|
||||
|
|
@ -283,7 +269,7 @@ Emitter.prototype.once = function(event, fn){
|
|||
fn.apply(this, arguments);
|
||||
}
|
||||
|
||||
fn._off = on;
|
||||
on.fn = fn;
|
||||
this.on(event, on);
|
||||
return this;
|
||||
};
|
||||
|
|
@ -300,7 +286,8 @@ Emitter.prototype.once = function(event, fn){
|
|||
|
||||
Emitter.prototype.off =
|
||||
Emitter.prototype.removeListener =
|
||||
Emitter.prototype.removeAllListeners = function(event, fn){
|
||||
Emitter.prototype.removeAllListeners =
|
||||
Emitter.prototype.removeEventListener = function(event, fn){
|
||||
this._callbacks = this._callbacks || {};
|
||||
|
||||
// all
|
||||
|
|
@ -320,8 +307,14 @@ Emitter.prototype.removeAllListeners = function(event, fn){
|
|||
}
|
||||
|
||||
// remove specific handler
|
||||
var i = index(callbacks, fn._off || fn);
|
||||
if (~i) callbacks.splice(i, 1);
|
||||
var cb;
|
||||
for (var i = 0; i < callbacks.length; i++) {
|
||||
cb = callbacks[i];
|
||||
if (cb === fn || cb.fn === fn) {
|
||||
callbacks.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
|
|
@ -548,9 +541,17 @@ try {
|
|||
// unable to parse the dependency, thus preventing it from
|
||||
// stopping the compilation after a failed lookup.
|
||||
Emitter = require(componentEmitter)
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
Emitter = require('events').EventEmitter
|
||||
Emitter.prototype.off = function () {
|
||||
var method = arguments.length > 1
|
||||
? this.removeListener
|
||||
: this.removeAllListeners
|
||||
return method.apply(this, arguments)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Emitter || require('events').EventEmitter
|
||||
module.exports = Emitter
|
||||
});
|
||||
require.register("vue/src/config.js", function(exports, require, module){
|
||||
module.exports = {
|
||||
|
|
@ -3170,7 +3171,6 @@ module.exports = {
|
|||
});
|
||||
require.alias("component-emitter/index.js", "vue/deps/emitter/index.js");
|
||||
require.alias("component-emitter/index.js", "emitter/index.js");
|
||||
require.alias("component-indexof/index.js", "component-emitter/deps/indexof/index.js");
|
||||
|
||||
require.alias("vue/src/main.js", "vue/index.js");if (typeof exports == "object") {
|
||||
module.exports = require("vue");
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -7,6 +7,14 @@ try {
|
|||
// unable to parse the dependency, thus preventing it from
|
||||
// stopping the compilation after a failed lookup.
|
||||
Emitter = require(componentEmitter)
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
Emitter = require('events').EventEmitter
|
||||
Emitter.prototype.off = function () {
|
||||
var method = arguments.length > 1
|
||||
? this.removeListener
|
||||
: this.removeAllListeners
|
||||
return method.apply(this, arguments)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Emitter || require('events').EventEmitter
|
||||
module.exports = Emitter
|
||||
3272
test/vue.test-cov.js
3272
test/vue.test-cov.js
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue