From b6b1fc3073a7b03713d40d65eba1d8d9aed2bf87 Mon Sep 17 00:00:00 2001 From: Alexandre Chopin Date: Tue, 13 Dec 2016 17:42:41 +0100 Subject: [PATCH] add component nuxt-child --- examples/custom-routes/pages/posts.vue | 2 +- lib/app/components/nuxt-child.vue | 38 ++++++++++++++++++++++++++ lib/app/index.js | 3 ++ lib/build/index.js | 1 + 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 lib/app/components/nuxt-child.vue diff --git a/examples/custom-routes/pages/posts.vue b/examples/custom-routes/pages/posts.vue index 946ca2731f..2740c339b0 100644 --- a/examples/custom-routes/pages/posts.vue +++ b/examples/custom-routes/pages/posts.vue @@ -1,6 +1,6 @@ diff --git a/lib/app/components/nuxt-child.vue b/lib/app/components/nuxt-child.vue new file mode 100644 index 0000000000..8e09629e46 --- /dev/null +++ b/lib/app/components/nuxt-child.vue @@ -0,0 +1,38 @@ + + + diff --git a/lib/app/index.js b/lib/app/index.js index 86daac5d69..91fcf7f98c 100644 --- a/lib/app/index.js +++ b/lib/app/index.js @@ -5,11 +5,14 @@ import Meta from 'vue-meta' import router from './router.js' <% if (store) { %>import store from '~store/index.js'<% } %> import NuxtContainer from './components/nuxt-container.vue' +import NuxtChild from './components/nuxt-child.vue' import Nuxt from './components/nuxt.vue' import App from '<%= appPath %>' // Component: Vue.component(NuxtContainer.name, NuxtContainer) +// Component: +Vue.component(NuxtChild.name, NuxtChild) // Component: Vue.component(Nuxt.name, Nuxt) diff --git a/lib/build/index.js b/lib/build/index.js index 8fd05707de..70f41a74a8 100644 --- a/lib/build/index.js +++ b/lib/build/index.js @@ -150,6 +150,7 @@ function * generateRoutesAndFiles () { 'router.js', 'server.js', 'utils.js', + 'components/nuxt-child.vue', 'components/nuxt-container.vue', 'components/nuxt.vue', 'components/nuxt-loading.vue'