Browse Source

remove rotas do app hellow e impl multiplas entradas

pull/2485/head
Leandro Roberto 7 years ago
parent
commit
a2289e91f2
  1. 0
      sapl-frontend/src/hellow/App.vue
  2. 0
      sapl-frontend/src/hellow/components/HelloWorld.vue
  3. 0
      sapl-frontend/src/hellow/main.js
  4. 11
      sapl-frontend/src/hellow/router.js
  5. 0
      sapl-frontend/src/hellow/store.js
  6. 0
      sapl-frontend/src/hellow/views/About.vue
  7. 4
      sapl-frontend/src/hellow/views/Home.vue
  8. 26
      sapl-frontend/src/router.js
  9. 8
      sapl-frontend/vue.config.js
  10. 4
      sapl/templates/base.html

0
sapl-frontend/src/App.vue → sapl-frontend/src/hellow/App.vue

0
sapl-frontend/src/components/HelloWorld.vue → sapl-frontend/src/hellow/components/HelloWorld.vue

0
sapl-frontend/src/main.js → sapl-frontend/src/hellow/main.js

11
sapl-frontend/src/hellow/router.js

@ -0,0 +1,11 @@
import Vue from "vue";
import Router from "vue-router";
Vue.use(Router);
export default new Router({
mode: "history",
base: process.env.BASE_URL,
routes: [
]
});

0
sapl-frontend/src/store.js → sapl-frontend/src/hellow/store.js

0
sapl-frontend/src/views/About.vue → sapl-frontend/src/hellow/views/About.vue

4
sapl-frontend/src/views/Home.vue → sapl-frontend/src/hellow/views/Home.vue

@ -1,13 +1,13 @@
<template>
<div class="home">
<img alt="Vue logo" src="../assets/logo.png" />
<img alt="Vue logo" src="../../assets/logo.png" />
<HelloWorld msg="Welcome to Your Vue.js App" />
</div>
</template>
<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";
import HelloWorld from "@/hellow/components/HelloWorld.vue";
export default {
name: "home",

26
sapl-frontend/src/router.js

@ -1,26 +0,0 @@
import Vue from "vue";
import Router from "vue-router";
import Home from "./views/Home.vue";
Vue.use(Router);
export default new Router({
mode: "history",
base: process.env.BASE_URL,
routes: [
{
path: "/",
name: "home",
component: Home
},
{
path: "/about",
name: "about",
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(/* webpackChunkName: "about" */ "./views/About.vue")
}
]
});

8
sapl-frontend/vue.config.js

@ -1,3 +1,4 @@
const BundleTracker = require('webpack-bundle-tracker')
module.exports = {
@ -26,5 +27,12 @@ module.exports = {
.https(false)
.headers({ 'Access-Control-Allow-Origin': '\*' })
config.entryPoints.delete('app')
// then add your own
config.entry('hellow')
.add('./src/hellow/main.js')
.end()
}
}

4
sapl/templates/base.html

@ -29,7 +29,7 @@
{# Scripts #}
{# modernizr must be in head (see http://modernizr.com/docs/#installing) #}
{% endcomment %}
{% render_bundle 'app' 'css' %}
{% render_bundle 'hellow' 'css' %}
{% endblock %}
</head>
@ -238,7 +238,7 @@
{% endif %}
{% block foot_js %}
{% render_bundle 'app' 'js' %}
{% render_bundle 'hellow' 'js' %}
{% comment "" %}

Loading…
Cancel
Save