+add sample webpack main scripts (webpack.page)

This commit is contained in:
xdrm-brackets 2018-02-20 00:53:08 +01:00
parent 1eba61dfd4
commit 8b4d818465
2 changed files with 48 additions and 0 deletions

24
webpack/page/home.js Normal file
View File

@ -0,0 +1,24 @@
/* (1) Imports
---------------------------------------------------------*/
/* (1) NPM libs */
import Vue from 'vue'
/* (2) Internal libs */
import {APIClient} from '../lib/api-client'
/* (3) Vues */
import wrapper_vue from '../vue/wrapper.vue'
/* (2) Initialisation
---------------------------------------------------------*/
/* (1) API */
window.api = new APIClient(gstore.data.is_local ? 'http://ptut.com:8080/api/v/1.0/' : 'https://ptut.xdrm.io/api/v/1.0/');
/* (2) Render view */
new Vue({
el: '#main-vue',
render: h => h(wrapper_vue)
});

24
webpack/page/login.js Normal file
View File

@ -0,0 +1,24 @@
/* (1) Imports
---------------------------------------------------------*/
/* (1) NPM libs */
import Vue from 'vue'
/* (2) Internal libs */
import {APIClient} from '../lib/api-client'
/* (3) Vues */
import wrapper_vue from '../vue/wrapper.vue'
/* (2) Initialisation
---------------------------------------------------------*/
/* (1) API */
window.api = new APIClient(gstore.data.is_local ? 'http://ptut.com:8080/api/v/1.0/' : 'https://ptut.xdrm.io/api/v/1.0/');
/* (2) Render view */
new Vue({
el: '#main-vue',
render: h => h(wrapper_vue)
});