From f8c7b5c0121b72fdf928fa2fdb1318156cf0c3e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Mon, 12 Dec 2016 16:30:07 +0100 Subject: [PATCH] Add validate option --- examples/custom-routes/nuxt.config.js | 23 ------------------- .../custom-routes/pages/projects/_slug.vue | 8 +++++++ .../custom-routes/pages/projects/index.vue | 2 +- lib/app/client.js | 12 ++++++++++ lib/app/router.js | 14 +++++------ lib/app/server.js | 22 ++++++++++++++++-- 6 files changed, 48 insertions(+), 33 deletions(-) diff --git a/examples/custom-routes/nuxt.config.js b/examples/custom-routes/nuxt.config.js index 38fa87ebb2..bb0765f744 100644 --- a/examples/custom-routes/nuxt.config.js +++ b/examples/custom-routes/nuxt.config.js @@ -1,27 +1,4 @@ module.exports = { - router: { - routes: { - // author: { - // alias: '/nuxt' - // }, - // users: { - // _id: { - // regexp: ':id(\\d+)' - // // generate: [1, 2, 3, 4] // Need to be finished on generate - // } - // }, - // posts: { - // alias: '/articles' - // } - } - }, - // generate: { - // routeParams: { - // '/guide/:slug': _(require('./static/docs/guide/menu.json')).values().flatten().map('to').compact().map((slug) => { return { slug: slug.replace(/^\//, '') } }).value(), - // '/api/:slug': _(require('./static/docs/api/menu.json')).values().flatten().map('to').compact().map((slug) => { return { slug: slug.replace(/^\//, '') } }).value(), - // '/examples/:slug': _(require('./static/docs/examples/menu.json')).values().flatten().map('to').compact().map((slug) => { return { slug: slug.replace(/^\//, '') } }).value() - // } - // }, build: { vendor: ['axios'] } diff --git a/examples/custom-routes/pages/projects/_slug.vue b/examples/custom-routes/pages/projects/_slug.vue index 0b1fba7bc0..bc9ae4ecd1 100644 --- a/examples/custom-routes/pages/projects/_slug.vue +++ b/examples/custom-routes/pages/projects/_slug.vue @@ -8,6 +8,14 @@ + +