JavaScript decorator for custom elements

Custom elements are around for quite some time, but after watching the latest episode of “Supercharged” which is about building a router component with custom elements, I felt the urge to fiddle around with it, too. To create a custom element with today’s modern APIs, there’s still some boilerplate code to write. And because I want to try out JS decorators as well, I build a simple decorator for classes which reduces the amount of this repetitive code a little bit....

June 16, 2016 · 4 min · Dustin Chabrowski

Improve (offline) user experience with Service Worker Toolbox

In the last post I introduced a push notification feature for this blog, which requires a Service Worker. This post is about making more use of this Service Worker by improving the (offline) user experience with Service Worker Toolbox. In case you don’t know what this Service Worker thingy is, I can recommend reading this and this article. Feature overkill? In order to cache resources and intercept requests there’s quite some code to write....

April 26, 2016 · 7 min · Dustin Chabrowski

Now supporting push notifications

With this day I finally implemented a simple subscription system using push notifications for new posts! 🚀 To get notified when a new post is published, simply check the box in the navigation panel and you’re registered. You will be asked to give your permission for this site to send you notifications. You can confirm it, I won’t spam you, I promise! If there’s no button visible, your browser lacks support for the required technologies 👎...

April 10, 2016 · 5 min · Dustin Chabrowski

Simple functional tests for gulp tasks

In the last post, I presented a simple setup to compile ES2015 JS code. Gulp was used there as a task runner and in this article I’ll show you a simple way to black-box-test your gulp tasks. The gulp task The first step I suggest to do, is to structure your gulp tasks/functions in a modular way, if not already done. For example, my task to compile ES2015 code and bundle the modules could look like this:...

January 4, 2016 · 4 min · Dustin Chabrowski

Easy ES2015 compilation with rollup.js, babel.js and gulp.js

As this year is over tomorrow, it’s my last chance to sneak in some 2015 stuff. In this post, I want to show you a simple setup I use to compile my JS written in ES2015 for this blog. Update 🚨 I’ve published a new version of this article featuring the latest updates of these tools. I recommend reading it since it’s easier and uses less dependencies. Go check it out!...

December 31, 2015 · 5 min · Dustin Chabrowski