This commit is contained in:
Mridul97
2019-02-16 00:06:33 +05:30
committed by Jeffrey Warren
parent e0ed73a24e
commit f42aa2fd67
3 changed files with 2 additions and 54 deletions

View File

@@ -15,7 +15,7 @@ module.exports = function(grunt) {
livereload: true
},
source: {
files: ["src/**/*", "Gruntfile.js"],
files: ["src/**/*", "Gruntfile.js", "examples/lib/*","examples/demo.js"],
tasks: ["build:js"]
}
},
@@ -53,6 +53,6 @@ module.exports = function(grunt) {
/* Default (development): Watch files and build on change. */
grunt.registerTask("default", ["watch"]);
grunt.registerTask("build", ["browserify:dist", "uglify:dist"]);
grunt.registerTask("build", ["browserify:dist","browserify:js","uglify:dist","uglify:js"]);
grunt.registerTask("serve", ["browserify:dist","browserify:js","uglify:dist","uglify:js","browserSync", "watch"]);
};

View File

@@ -1,17 +0,0 @@
$(document).ready(function($){
$(function(){
$(window).scroll(function(){
if ($(this).scrollTop() > 100){
$('.move-up').fadeIn();
} else {
$('.move-up').fadeOut();
}
});
$('.move-up button').click(function(){
$('body,html').animate({
scrollTop: 0
}, 800);
return false;
});
});
});

View File

@@ -1,35 +0,0 @@
const staticCacheName = 'image-sequencer-static-v3';
self.addEventListener('install', event => {
console.log('Attempting to install service worker');
});
self.addEventListener('activate', function(e) {
console.log('[ServiceWorker] Activate');
e.waitUntil(
caches.keys().then(function(cacheNames) {
return Promise.all(
cacheNames.filter(function(cacheName){
return cacheName.startsWith('image-sequencer-') &&
cacheName != staticCacheName;
}).map(function(cacheName){
return caches.delete(cacheName);
})
);
})
);
});
self.addEventListener('fetch', function(event) {
event.respondWith(
caches.open(staticCacheName).then(function(cache) {
return cache.match(event.request).then(function (response) {
return response || fetch(event.request).then(function(response) {
if(event.request.method == "GET")
cache.put(event.request, response.clone());
return response;
});
});
})
);
});