Skip to content

Commit

Permalink
Merge pull request #17 from StickmanVentures/clean-up
Browse files Browse the repository at this point in the history
Clean up SW, fix SW reg when missing cache ref
  • Loading branch information
justinribeiro committed Jul 8, 2016
2 parents 866bf30 + 4d20cc3 commit d101b56
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
3 changes: 1 addition & 2 deletions app.yaml
@@ -1,5 +1,5 @@
application: sv-ginger
version: 0-0-1
version: 0-0-2
runtime: python27
api_version: 1
threadsafe: yes
Expand Down Expand Up @@ -82,4 +82,3 @@ skip_files:
- ^(.*/)?.*\.bak$
- ^(.*/)?node_modules/.*
- ^(.*/)?tests/.*
- ^.*.md|markdown
25 changes: 12 additions & 13 deletions app/static/index.html
Expand Up @@ -369,25 +369,24 @@ <h1>Share Link <button id="copytoclipboard-share" data-clipboard-target="#share-
<div id="version-modal" class="hidden">
<div class="full-shadow"></div>
<div class="modal">
<h1>New Version: Ginger v2.0.1</h1>
<h1>New Version: Ginger v2.1.0</h1>
<p>➡ Now a Progressive Web App - Use "Add to Homescreen"</p>
<p>➡ Share a pose added</p>
<p>➡ Ability to screenshot added</p>
<p>➡ Service Worker for offline support via platinum-sw-*</p>
<p>➡ Three.js to version r71</p>
<p>➡ Accessibility updates for color contract</p>
<p>➡ 100/100 in <a href="https://github.com/GoogleChrome/lighthouse" style="color:#ffffff">Lighthouse</a> audit</p>
</div>
</div>

<div id="counter" class="hidden"></div>

<platinum-sw-register auto-register
clients-claim
skip-waiting>
<platinum-sw-offline-analytics></platinum-sw-offline-analytics>
<platinum-sw-cache default-cache-strategy="fastest"
cache-config-file="/cache-config.json">
</platinum-sw-cache>
</platinum-sw-register>
<platinum-sw-register auto-register
clients-claim
skip-waiting>
<platinum-sw-cache default-cache-strategy="fastest"
cache-config-file="cache-config.json">
</platinum-sw-cache>
<platinum-sw-fetch handler="cacheFirst" path="/images/(.*)"></platinum-sw-fetch>
<platinum-sw-offline-analytics></platinum-sw-offline-analytics>
</platinum-sw-register>

<!-- build:js /scripts/app.js async -->
<script src="/scripts/easing.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/static/scripts/app.js
Expand Up @@ -72,7 +72,7 @@ ga('send', 'pageview');

function appInit() {

var version = '1';
var version = '2';

document.getElementById('hide-header').addEventListener('click', function (e) {
ga('send', 'pageview', {'page': '/header-hidden', 'title': 'Header hidden'});
Expand Down
4 changes: 2 additions & 2 deletions gulpfile.js
Expand Up @@ -77,7 +77,7 @@ gulp.task('vulcanize', ['copy'], function() {
.pipe(gulp.dest('dist/static/elements'));
});

gulp.task('html:compress', function() {
gulp.task('html:compress', ['html', 'copy'], function() {
return gulp.src('tmp/static/index.html')
.pipe(useref())
.pipe(minifyInline({js: false}))
Expand Down Expand Up @@ -113,7 +113,7 @@ gulp.task('cache-config', ['copy'], function(callback) {
config.precache = files;

var md5 = crypto.createHash('md5');
md5.update(JSON.stringify(config.precache));
md5.update(JSON.stringify(config.precache) + new Date().getTime().toString());
config.precacheFingerprint = md5.digest('hex');

var configPath = path.join(dir, 'cache-config.json');
Expand Down

0 comments on commit d101b56

Please sign in to comment.