Skip to content

Commit

Permalink
v.0.4.1 => fix typo, add tests!
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeedwin committed Jan 30, 2020
1 parent f957354 commit 322fc00
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

All notable changes to the "vscode-pwa" extension will be documented here.

## 0.4.0
## 0.4.1
- add workbox bundler setup, more eloborated docs for guide!
- workbox 5.0 support
- fix little bug, type fix!

## 0.3.16
- default to a minimal app manifest
Expand Down
24 changes: 24 additions & 0 deletions _tests/app.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"background_color": "#fff",
"display": "standalone",
"orientation":"portrait",
"theme_color": "#fff",
"short_name": "App Name",
"name": "App Name",
"description": "About your App",
"lang": "en-US",
"icons": [
{
"src": "images/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "images/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"start_url": "index.html",
"scope": "./"
}
21 changes: 21 additions & 0 deletions _tests/service-worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { registerRoute } from 'workbox-routing';
import { CacheFirst } from 'workbox-strategies';
import { Plugin as ExpirationPlugin } from 'workbox-expiration';
import { CacheableResponsePlugin } from 'workbox-cacheable-response';
import * as googleAnalytics from 'workbox-google-analytics';

registerRoute(
// cache all images in './images/' directory
new RegExp('/images/'),
// use cache-first workbox strategy
new CacheFirst({
cacheName: 'image-cache',
plugins: [
new ExpirationPlugin({
maxEntries: 20,
}),
],
})
);

googleAnalytics.initialize();
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-pwa",
"displayName": " PWA VS Code",
"description": "Progressive Web Apps Code Snippets (Including Workbox Support)",
"version": "0.4.0",
"version": "0.4.1",
"publisher": "mayeedwin",
"engines": {
"vscode": "^1.8.0"
Expand Down
2 changes: 1 addition & 1 deletion snippets/javascript.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"import { CacheFirst } from 'workbox-strategies';",
"import { Plugin as ExpirationPlugin } from 'workbox-expiration';",
"import { CacheableResponsePlugin } from 'workbox-cacheable-response';",
"import {* as googleAnalytics} from 'workbox-google-analytics';"
"import * as googleAnalytics from 'workbox-google-analytics';"
],
"description": "workbox node modules"
},
Expand Down

0 comments on commit 322fc00

Please sign in to comment.