@cerebral/vue
Advanced tools
Comparing version 4.0.4 to 4.1.0-1551020966578
{ | ||
"name": "@cerebral/vue", | ||
"version": "4.0.4", | ||
"version": "4.1.0-1551020966578", | ||
"description": "Vue.js view for Cerebral", | ||
@@ -17,3 +17,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"cerebral": "^5.0.4" | ||
"cerebral": "^5.1.0-1551020966578" | ||
}, | ||
@@ -20,0 +20,0 @@ "scripts": { |
@@ -43,8 +43,8 @@ # @cerebral/vue | ||
import { connect } from '@cerebral/vue' | ||
import { state, signal } from 'cerebral/proxy' | ||
import { state, sequence } from 'cerebral' | ||
export default connect( | ||
{ | ||
foo: state.foo, | ||
click: signal.clicked | ||
foo: state`foo`, | ||
click: sequence`clicked` | ||
}, | ||
@@ -76,37 +76,1 @@ { | ||
``` | ||
## .vue file | ||
You can also connect inside a **.vue** file. When using [ParcelJS](https://parceljs.org/) this requires additional packages. | ||
`npm install parcel-plugin-vue babel-preset-env --save-dev` | ||
Then add the preset to your **.babelrc** file: | ||
```js | ||
{ | ||
"presets": ["env"], | ||
"plugins": ["cerebral"] | ||
} | ||
``` | ||
Your component file can now be written as: | ||
_MyComponent.vue_ | ||
```js | ||
<template> | ||
<div v-on:click="click()">{{foo}}</div> | ||
</template> | ||
<script> | ||
import { connect } from '@cerebral/vue' | ||
import { state, signal } from 'cerebral/proxy' | ||
export default connect( | ||
{ | ||
foo: state.foo, | ||
click: signal.clicked | ||
} | ||
) | ||
</script> | ||
``` |
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
11042
2
75