Skip to content

Instantly share code, notes, and snippets.

View marconi1992's full-sized avatar
:octocat:

Felipe Guizar Diaz marconi1992

:octocat:
  • Etsy
  • Guadalajara
View GitHub Profile
import NovaConsumerPlugin from '@ara/webpack-nova-consumer'
export default {
...
build: {
/*
** You can extend webpack config here
*/
extend (config, ctx) {
config.plugins.push(new NovaConsumerPlugin({
<template>
<div class="container">
<div>
<logo />
<nova name="Example" :data="{ title: 'Ara Framework' }"/>
</div>
<div>
<nuxt-link to="/bar">Bar Page</nuxt-link>
</div>
</div>
<template>
<div class="container">
<div>
<logo />
<nova name="Bar" :data="{ title: 'Bar Page' }"/>
</div>
<div>
<nuxt-link to="/">Main Page</nuxt-link>
</div>
</div>
import { load, Vue, mountComponent, loadById } from 'hypernova-vue'
import Example from './components/Example.vue'
const render = (name, { node, data }) => {
if (name === 'Bar') {
return mountComponent(Vue.extend(Example), node, data)
}
}
document.addEventListener('NovaMount', ({ detail }) => {
<template>
<div>
<h1>{{title}}</h1>
<input type="text" v-model="title">
</div>
</template>
<script>
export default {
props: ['title']
import NovaConsumerPlugin from '@ara/webpack-nova-consumer'
export default {
...
build: {
/*
** You can extend webpack config here
*/
extend (config, ctx) {
config.plugins.push(new NovaConsumerPlugin({
<template>
<div class="container">
<logo />
<nova name="Example" :data="{ title: 'Ara Framework' }"/>
</div>
</template>
<script>
import Nova from 'nova-vue-bridge'
import Logo from '~/components/Logo.vue'
<!DOCTYPE html>
<html lang="en">
<head>
....
</head>
<body>
....
<script src="http://localhost:3000/public/client.js"></script>
</body>
</html>
<template>
<div>
<h2>{{title}}</h2>
<div>
<input type="text" v-model="title">
</div>
<br/>
</div>
</template>
<script>
<div data-hypernova-key="Example" data-hypernova-id="d198fa6c-c9ec-11e9-a223-8c85903a4c93"></div>
<script type="application/json" data-hypernova-key="Example" data-hypernova-id="d198fa6c-c9ec-11e9-a223-8c85903a4c93"><!--{"title":"Ara Framework"}--></script>