@@ -19,21 +19,21 @@ modifications to the Web UI.
1919
2020Example ` .env.ibm ` :
2121
22- ```
22+ ``` shell
2323NODE_ENV=production
2424VUE_APP_ENV_NAME=ibm
2525```
2626
2727## Store
2828
29- ::: tip [ Vuex store modules] ( https://vuex.vuejs.org/guide/modules.html ) contain
30- the application's API calls. :::
29+ ** tip** [ Vuex store modules] ( https://vuex.vuejs.org/guide/modules.html ) contain
30+ the application's API calls.
3131
32321 . If making customizations to the default store, add ` CUSTOM_STORE=true ` key
3333 value pair to the new .env file.
34- 2 . Create a ` <ENV_NAME>.js ` file in ` src/env/store ` ::: danger The filename needs
35- to match the ` VUE_APP_ENV_NAME ` value defined in the .env file. The store
36- import in ` src/main.js ` will resolve to this new file. :::
34+ 2 . Create a ` <ENV_NAME>.js ` file in ` src/env/store ` ** danger** The filename
35+ needs to match the ` VUE_APP_ENV_NAME ` value defined in the .env file. The
36+ store import in ` src/main.js ` will resolve to this new file.
37373 . Import the base store
38384 . Import environment specific store modules
39395 . Use the [ Vuex] ( https://vuex.vuejs.org/api/#registermodule ) ` registerModule `
@@ -42,7 +42,7 @@ the application's API calls. :::
4242
4343Example ` src/env/store/ibm.js ` :
4444
45- ```
45+ ``` js
4646import store from ' @/store; //@ aliases to src directory
4747import HmcStore from ' ./Hmc/HmcStore' ;
4848
@@ -53,17 +53,17 @@ export default store;
5353
5454## Router
5555
56- ::: tip [ Vue Router] ( https://router.vuejs.org/guide/ ) determines which pages are
57- accessible in the UI. :::
56+ ** tip** [Vue Router](https://router.vuejs.org/guide/) determines which pages are
57+ accessible in the UI.
5858
59591. If making customizations to the default router, add `CUSTOM_ROUTER=true` key
6060 value pair to the new .env file.
61- 2 . Create a ` <ENV_NAME>.js ` file in ` src/env/router ` ::: danger The filename
61+ 2. Create a `<ENV_NAME>.js` file in `src/env/router` ** danger** The filename
6262 needs to match the `VUE_APP_ENV_NAME` value defined in the .env file. The
63- routes import in ` src/router/index.js ` will resolve to this new file. :::
64- 3 . Define new [ routes] ( https://router.vuejs.org/api/#routes ) . ::: tip Use static
63+ routes import in `src/router/index.js` will resolve to this new file.
64+ 3. Define new [routes](https://router.vuejs.org/api/#routes). ** tip** Use static
6565 imports (over lazy-loading routes) to avoid creating separate JS chunks.
66- Static imports also helps to keep the total build size down. :::
66+ Static imports also helps to keep the total build size down.
67674. Add default export
6868
6969## App navigation
@@ -76,11 +76,11 @@ in src/components/AppNavigation/AppNavigation.vue.
7676
77771. If making customizations to the app navigation, add `CUSTOM_APP_NAV=true` key
7878 value pair to the new .env file.
79- 2 . Create a ` <ENV_NAME>.js ` file in ` src/env/components/AppNavigation ` :::danger
80- The filename needs to match the ` VUE_APP_ENV_NAME ` value defined in the .env
81- file. The AppNavigationMixin import in
79+ 2. Create a `<ENV_NAME>.js` file in `src/env/components/AppNavigation`
80+ **danger** The filename needs to match the `VUE_APP_ENV_NAME` value defined
81+ in the .env file. The AppNavigationMixin import in
8282 `src/components/AppNavigation/AppNavigation.vue` will resolve to this new
83- file. :::
83+ file.
84843. Your custom mixin should follow a very similar structure to the default
8585 AppNavigationMixin.js file. It should include a data property named
8686 `navigationItems` that should be an array of of navigation objects. Each
@@ -90,16 +90,15 @@ in src/components/AppNavigation/AppNavigation.vue.
9090
9191## Theming
9292
93- ::: tip
93+ ** tip**
9494[Bootstrap theming](https://getbootstrap.com/docs/4.5/getting-started/theming/)
95- allows for easy visual customizations. :::
95+ allows for easy visual customizations.
9696
97971. If making customizations to the default styles, add `CUSTOM_STYLES=true` key
9898 value pair to the new .env file.
99- 2 . Create a ` _<ENV_NAME>.scss ` partial in ` src/env/assets/styles ` ::: danger The
100- filename needs to match the ` VUE_APP_ENV_NAME ` value defined in the .env
99+ 2. Create a `_<ENV_NAME>.scss` partial in `src/env/assets/styles`. ** danger**
100+ The filename needs to match the `VUE_APP_ENV_NAME` value defined in the .env
101101 file. The webpack sass loader will attempt to import a file with this name.
102- :::
1031023. Add style customizations. Refer to
104103 [bootstrap documentation](https://getbootstrap.com/docs/4.5/getting-started/theming/)
105104 for details about
@@ -111,7 +110,7 @@ Example for adding custom colors
111110
112111`src/env/assets/styles/_ibm.scss`
113112
114- ```
113+ ```css
115114// Custom theme colors
116115
117116$primary: rebeccapurple;
@@ -123,7 +122,8 @@ $success: lime;
1231221. Add the same `VUE_APP_ENV_NAME` key value pair to your
124123 `env.development.local` file.
1251242. Use serve script
126- ```
125+
126+ ```shell
127127 npm run serve
128128 ```
129129
@@ -133,14 +133,14 @@ Run npm build script with vue-cli `--mode`
133133[option flag](https://cli.vuejs.org/guide/mode-and-env.html#modes). This
134134requires [corresponding .env file to exist](#setup).
135135
136- ```
136+ ```shell
137137npm run build -- --mode ibm
138138```
139139
140- ** OR **
140+ OR
141141
142142pass env variable directly to script
143143
144- ```
144+ ```shell
145145VUE_APP_ENV_NAME=ibm npm run build
146146```
0 commit comments