pwa 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +19 -0
- data/app/helpers/pwa_helper.rb +7 -0
- data/lib/pwa/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fe07b15c94d9ce07eeeb9d04c77bf04a73a5d70923d176da438b5a096b27e70
|
4
|
+
data.tar.gz: 2945a4cc6a2326e3386acd27e486530a71a33824820e896e6145b7127d5a115d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72aeb998d4323c29359152efb66b8481ebb815b34f5a121d41e5fea916f4897a5c4a43e578b94d145011c7c7bc2cf2131107323f3ecb7300b813dbf668671841
|
7
|
+
data.tar.gz: 0ca785f4e2cba1ac96b79f1145aba452772b9efa7a146a13ac80c7b76d25baaa0c6ad2dd3d564e2c41b2e23eefc183f691940a1304aa4327f2f8a13ac01c2865
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -25,6 +25,7 @@ If a PWA is not enough and you want to bring your Web App into the store - check
|
|
25
25
|
* [Usage](#usage)
|
26
26
|
* [Manifest](#manifest)
|
27
27
|
* [Service worker](#service-worker)
|
28
|
+
* [Views](#views)
|
28
29
|
* [To Do](#to-do)
|
29
30
|
* [Contributing](#contributing)
|
30
31
|
* [Contributors](#contributors)
|
@@ -59,6 +60,12 @@ Now run the generator:
|
|
59
60
|
|
60
61
|
$ rails g pwa
|
61
62
|
|
63
|
+
Add the following to the `head` tag of your layout file:
|
64
|
+
|
65
|
+
```haml
|
66
|
+
= pwa_manifest
|
67
|
+
```
|
68
|
+
|
62
69
|
Make sure to add the required javascript in `app/assets/javascripts/application.js`:
|
63
70
|
|
64
71
|
```js
|
@@ -93,6 +100,18 @@ You can customize the page that shows up when a requested page has not been cach
|
|
93
100
|
importScripts('https://example.com/pwa-sw.js');
|
94
101
|
```
|
95
102
|
|
103
|
+
### Views
|
104
|
+
|
105
|
+
To detect whether or not your app is currently being used as a Progressive Web App, you can use CSS media queries:
|
106
|
+
|
107
|
+
```css
|
108
|
+
@media all and (display-mode: standalone) {
|
109
|
+
/* ... */
|
110
|
+
}
|
111
|
+
```
|
112
|
+
|
113
|
+
**Note:** Make sure to use `fullscreen` instead of `standalone` if that is your PWA display mode.
|
114
|
+
|
96
115
|
---
|
97
116
|
|
98
117
|
## To Do
|
data/lib/pwa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Hübotter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -62,6 +62,7 @@ files:
|
|
62
62
|
- LICENSE
|
63
63
|
- README.md
|
64
64
|
- app/controllers/pwa/offline_controller.rb
|
65
|
+
- app/helpers/pwa_helper.rb
|
65
66
|
- config/routes.rb
|
66
67
|
- lib/generators/pwa_generator.rb
|
67
68
|
- lib/generators/templates/manifest.json
|