You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 26, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/guide/README.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ When you want to play with Vue Storefront there are 3 options:
54
54
55
55
To do any of this simply type `yarn installer` in the root of the project and answer the questions in the console. Once the installation is done type yarn dev to run your project (by default of port 3000). No matter what option you choose you can change the settings in config file later.
56
56
57
-
## Vue Storefront configfile
57
+
## Vue Storefront configfile
58
58
Most of the Vue Storefront configuration (like active theme, backend API addresses, multistore setup etc) is done through it's config file that can be found under `config` folder. The `default.json` file contains all the default setup.
59
59
60
60
For your own implementation you should create a `local.json` file in the same directry and include fields from `default.json` that you want to override. This two files will be merged in favour of `local.json` during a build process. If you will use installer to set up your Vue Storefront instance it'll generate proper config files.
@@ -64,13 +64,13 @@ For your own implementation you should create a `local.json` file in the same di
64
64
While making themes in Vue Storefront in most cases all you need to take care of is creating your own HTML and CSS markup. All required business logic is exposed by core with it's core modules and can be easly injected into any of theme components.
65
65
The mechanism of injecting core business logic into themes is very simple. We are using Vue.js mixins to keep upgradable business logic in the core.
66
66
67
-
Business logic from core component can be easly injected into any theme component as a Vue.jsmixin. We can easly inject it into any of our theme components just my importing it and adding as a mixin ( eg `mixins: [Microcart]` is what you need to use core Microcart logic). This is all you need to make use of core business logic inside your theme. With this approach we can easly ship updates to all core components without breaking your shop.
67
+
Business logic from core component can be easly injected into any theme component as a Vue.jsmixin. We can easly inject it into any of our theme components just by importing it and adding it as a mixin ( eg `mixins: [Microcart]` is what you need to use core Microcart logic). This is all you need to make use of core business logic inside your theme. With this approach we can easly ship updates to all core components without breaking your shop.
68
68
69
-
The easiest way to create your own theme is to create a copy of the default one, change it's name in it's `package.json` file, change active theme in `config/local.jso`n and run `yarn` to make lerna linking (which we are using for monorepos).
69
+
The easiest way to create your own theme is to create a copy of the default one, change it's name in it's `package.json` file, change active theme in `config/local.json` and run `yarn` to make lerna linking (which we are using for monorepos).
70
70
71
71
## Offline mode and cache
72
72
73
-
Vue Storefront is still working even while user is offline.
73
+
Vue Storefront is still working even while a user is offline.
74
74
75
75
We managed to do this by making heavy use of the browser cache.
76
76
For the static assets (only prod) we are using sw-precache plugin (config can be found in `core/build/webpack.prod.sw.config.js` ). They are cached in Service Worker and can be inspected under `Application/Cache Storage` tab of your Developer Tools.
@@ -79,7 +79,7 @@ For the static assets (only prod) we are using sw-precache plugin (config can be
79
79
Please mind that Service Worker is working only on production mode.
80
80
:::
81
81
82
-
For the catalog and store data cache we are using IndexedDB and Local Storage. We are also prefetching products from visited categories so once you enter one all of it's products are available offline. The mechanism of offline storage is located under core/lin./storage.
82
+
For the catalog and store data cache we are using IndexedDB and Local Storage. We are also prefetching products from visited categories so once you enter one, all of it's products are available offline. The mechanism of offline storage is located under `core/store/lib/storage.ts`.
83
83
84
84
We are using some of cached data even while user is online to display the content instantly. This is why Vue Storefront is so fast.
0 commit comments