mirror of https://github.com/vuejs/vue.git
scaffolding
This commit is contained in:
parent
b41cf22720
commit
ecb125d33a
|
|
@ -0,0 +1,5 @@
|
|||
function Binding () {
|
||||
|
||||
}
|
||||
|
||||
module.exports = Binding
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function Compiler () {
|
||||
|
||||
}
|
||||
|
||||
module.exports = Compiler
|
||||
|
|
@ -0,0 +1 @@
|
|||
module.exports = {}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function Directive () {
|
||||
|
||||
}
|
||||
|
||||
module.exports = Directive
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
exports.$get = function (path) {
|
||||
|
||||
}
|
||||
|
||||
exports.$set = function (path, val) {
|
||||
|
||||
}
|
||||
|
||||
exports.$watch = function (key, cb) {
|
||||
|
||||
}
|
||||
|
||||
exports.$unwatch = function (id) {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
exports.$appendTo = function () {
|
||||
|
||||
}
|
||||
|
||||
exports.$prependTo = function () {
|
||||
|
||||
}
|
||||
|
||||
exports.$before = function () {
|
||||
|
||||
}
|
||||
|
||||
exports.$after = function () {
|
||||
|
||||
}
|
||||
|
||||
exports.$remove = function () {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
;['emit', 'on', 'off', 'once'].forEach(function (method) {
|
||||
exports[method] = function () {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
exports.$broadcast = function () {
|
||||
|
||||
}
|
||||
|
||||
exports.$dispatch = function () {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
exports.$mount = function (el) {
|
||||
|
||||
}
|
||||
|
||||
exports.$destroy = function () {
|
||||
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
module.exports = 123
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
// common utils
|
||||
|
||||
exports.mixin = function (target, mixin) {
|
||||
for (var key in mixin) {
|
||||
if (target[key] !== mixin[key]) {
|
||||
target[key] = mixin[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
33
src/vue.js
33
src/vue.js
|
|
@ -1,7 +1,28 @@
|
|||
var test = require('./test')
|
||||
var _ = require('./util'),
|
||||
Compiler = require('./compiler/compiler')
|
||||
|
||||
module.exports = {
|
||||
test: function () {
|
||||
return test
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The exposed Vue constructor.
|
||||
*/
|
||||
function Vue (options) {
|
||||
this._compiler = new Compiler(this, options)
|
||||
}
|
||||
|
||||
// mixin instance methods
|
||||
var p = Vue.prototype
|
||||
_.mixin(p, require('./instance/lifecycle'))
|
||||
_.mixin(p, require('./instance/data'))
|
||||
_.mixin(p, require('./instance/dom'))
|
||||
_.mixin(p, require('./instance/events'))
|
||||
|
||||
// mixin asset registers
|
||||
_.mixin(Vue, require('./api/asset-register'))
|
||||
|
||||
// static methods
|
||||
Vue.config = require('./api/config')
|
||||
Vue.use = require('./api/use')
|
||||
Vue.require = require('./api/require')
|
||||
Vue.extend = require('./api/extend')
|
||||
Vue.nextTick = require('./util').nextTick
|
||||
|
||||
module.exports = Vue
|
||||
Loading…
Reference in New Issue