@cerebral/vue
Advanced tools
Comparing version 3.2.1 to 3.2.2-1523952156059
{ | ||
"name": "@cerebral/vue", | ||
"version": "3.2.1", | ||
"version": "3.2.2-1523952156059", | ||
"description": "Vue.js view for Cerebral", | ||
@@ -17,3 +17,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"cerebral": "^4.2.1" | ||
"cerebral": "^4.2.2-1523952156059" | ||
}, | ||
@@ -20,0 +20,0 @@ "scripts": { |
@@ -6,9 +6,11 @@ # @cerebral/vue | ||
## Install | ||
`npm install @cerebral/vue vue` | ||
## Container | ||
```js | ||
import Vue from 'vue/dist/vue' | ||
import {Controller} from 'cerebral' | ||
import {Container, connect} from '@cerebral/vue' | ||
import { Controller } from 'cerebral' | ||
import { Container, connect } from '@cerebral/vue' | ||
@@ -24,3 +26,3 @@ const controller = Controller({ | ||
var app = new Vue({ | ||
var app = new Vue({ | ||
el: '#app', | ||
@@ -33,3 +35,3 @@ components: { | ||
**Note!** The HTML of the root element must use the *container*: | ||
**Note!** The HTML of the root element must use the _container_: | ||
@@ -45,20 +47,26 @@ ```html | ||
## connect | ||
*MyComponent.js* | ||
_MyComponent.js_ | ||
```js | ||
import {connect} from '@cerebral/vue' | ||
import {state, signal} from 'cerebral/tags' | ||
import { connect } from '@cerebral/vue' | ||
import { state, signal } from 'cerebral/tags' | ||
export default connect({ | ||
foo: state`foo`, | ||
click: signal`clicked` | ||
}, { | ||
template: '<div v-on:click="click()">{{foo}}</div>' | ||
}) | ||
export default connect( | ||
{ | ||
foo: state`foo`, | ||
click: signal`clicked` | ||
}, | ||
{ | ||
template: '<div v-on:click="click()">{{foo}}</div>' | ||
} | ||
) | ||
``` | ||
*main.js* | ||
_main.js_ | ||
```js | ||
import Vue from 'vue/dist/vue' | ||
import {Controller} from 'cerebral' | ||
import {Container, connect} from '@cerebral/vue' | ||
import { Controller } from 'cerebral' | ||
import { Container, connect } from '@cerebral/vue' | ||
import MyComponent from './MyComponent' | ||
@@ -75,3 +83,3 @@ | ||
var app = new Vue({ | ||
var app = new Vue({ | ||
el: '#app', | ||
@@ -78,0 +86,0 @@ components: { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10580
87
9
2