A Vue.js project
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
# run unit tests
npm run unit
# run e2e tests
npm run e2e
# run all tests
npm test
command: npm run build
config:
// config/index.js
{
assetsPublicPath: '/' // change it if the project is not under website root
}
// src/config.js
config = {
isCROS: false, // is the frontend and backend under diffrent domain.
clientBaseUrl: null, // for vue-router html5 mode, define the base url of frontend
serverBaseUrl: null, // for axios, define the base url of request to backend
}
For detailed explanation on how things work, checkout the guide and docs for vue-loader.
[17/04/28 15:32] add ./src/components/GoogleMapTrackRender.vue
[17/04/29 16:13] Left sidebar menu is ok. First, define the menu item text in dir 'lang', then define menu items in store/menu.js
[17/04/29 17:25] full screen button: append '' to md-card-header -> md-title. example:
<md-card-header>
<div class="md-title">Google Map<fullscreen-button></fullscreen-button></div>
</md-card-header>
define global variabel before all scripts. example:
<script> window.serverBaseUrl = '' </script>
define permission to menu item. permission can be follow value:
- null || undefined || 0: allow all
- name(eg: ADMIN): allow user who's actions include the name
- function(user): by its result