From 8b4d81846588f000162b31317729ae8741801567 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 20 Feb 2018 00:53:08 +0100 Subject: [PATCH] +add sample webpack main scripts (webpack.page) --- webpack/page/home.js | 24 ++++++++++++++++++++++++ webpack/page/login.js | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 webpack/page/home.js create mode 100644 webpack/page/login.js diff --git a/webpack/page/home.js b/webpack/page/home.js new file mode 100644 index 0000000..04be724 --- /dev/null +++ b/webpack/page/home.js @@ -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) +}); \ No newline at end of file diff --git a/webpack/page/login.js b/webpack/page/login.js new file mode 100644 index 0000000..04be724 --- /dev/null +++ b/webpack/page/login.js @@ -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) +}); \ No newline at end of file