@cerebral/vue
Advanced tools
Comparing version 1.0.0-1504537127726 to 1.0.0-1504939819809
{ | ||
"name": "@cerebral/vue", | ||
"version": "1.0.0-1504537127726", | ||
"version": "1.0.0-1504939819809", | ||
"description": "Vue.js view for Cerebral", | ||
@@ -17,3 +17,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"cerebral": "^2.1.0" | ||
"cerebral": "^2.2.0-1504939819809" | ||
}, | ||
@@ -20,0 +20,0 @@ "scripts": { |
@@ -5,6 +5,6 @@ # @cerebral/vue | ||
**NPM** | ||
## Install | ||
`npm install @cerebral/vue vue` | ||
## Container | ||
```js | ||
@@ -40,2 +40,4 @@ import Vue from 'vue/dist/vue' | ||
## connect | ||
*MyComponent.js* | ||
```js | ||
@@ -52,1 +54,23 @@ import {connect} from '@cerebral/vue' | ||
``` | ||
*main.js* | ||
```js | ||
import Vue from 'vue/dist/vue' | ||
import {Controller} from 'cerebral' | ||
import {Container, connect} from '@cerebral/vue' | ||
import MyComponent from './MyComponent' | ||
const controller = Controller({ | ||
state: { | ||
foo: 'bar' | ||
} | ||
}) | ||
var app = new Vue({ | ||
el: '#app', | ||
components: { | ||
container: Container(controller), | ||
'my-component': MyComponent | ||
} | ||
}) | ||
``` |
23835
74