|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | Copyright 2019 Google LLC
|
|---|
| 3 |
|
|---|
| 4 | Use of this source code is governed by an MIT-style
|
|---|
| 5 | license that can be found in the LICENSE file or at
|
|---|
| 6 | https://opensource.org/licenses/MIT.
|
|---|
| 7 | */
|
|---|
| 8 |
|
|---|
| 9 | import {cacheNames as _cacheNames} from './_private/cacheNames.js';
|
|---|
| 10 | import './_version.js';
|
|---|
| 11 |
|
|---|
| 12 | /**
|
|---|
| 13 | * Get the current cache names and prefix/suffix used by Workbox.
|
|---|
| 14 | *
|
|---|
| 15 | * `cacheNames.precache` is used for precached assets,
|
|---|
| 16 | * `cacheNames.googleAnalytics` is used by `workbox-google-analytics` to
|
|---|
| 17 | * store `analytics.js`, and `cacheNames.runtime` is used for everything else.
|
|---|
| 18 | *
|
|---|
| 19 | * `cacheNames.prefix` can be used to retrieve just the current prefix value.
|
|---|
| 20 | * `cacheNames.suffix` can be used to retrieve just the current suffix value.
|
|---|
| 21 | *
|
|---|
| 22 | * @return {Object} An object with `precache`, `runtime`, `prefix`, and
|
|---|
| 23 | * `googleAnalytics` properties.
|
|---|
| 24 | *
|
|---|
| 25 | * @memberof workbox-core
|
|---|
| 26 | */
|
|---|
| 27 | const cacheNames = {
|
|---|
| 28 | get googleAnalytics(): string {
|
|---|
| 29 | return _cacheNames.getGoogleAnalyticsName();
|
|---|
| 30 | },
|
|---|
| 31 | get precache(): string {
|
|---|
| 32 | return _cacheNames.getPrecacheName();
|
|---|
| 33 | },
|
|---|
| 34 | get prefix(): string {
|
|---|
| 35 | return _cacheNames.getPrefix();
|
|---|
| 36 | },
|
|---|
| 37 | get runtime(): string {
|
|---|
| 38 | return _cacheNames.getRuntimeName();
|
|---|
| 39 | },
|
|---|
| 40 | get suffix(): string {
|
|---|
| 41 | return _cacheNames.getSuffix();
|
|---|
| 42 | },
|
|---|
| 43 | };
|
|---|
| 44 |
|
|---|
| 45 | export {cacheNames};
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.