Convert SASS to SCSS

Simple post. I had a bunch of SASS files mixed with SCSS files - we prefer SCSS. Manually convert? Fuck no! Automatically convert? Fuck yes! sass-convert -R --from sass --to scss ./path/to/files gist of the above sass-convert

Angular Component Template Unit Testing. it('should move to the previous period', inject(($compile) => { scope.test = {}; element = angular.element('<period-picker date="" period="month"></period-picker>'); element = $compile(element)(scope); $rootScope.$digest(); const buttons = element.find('button'); angular.element(buttons[0]).triggerHandler('click'); const isolatedScope = element.isolateScope(); // last of February expect(isolatedScope.$'2015-02-28').toDate()); }));

Angular .component() Transclusion - component inception.

2017 has been a trans-year if I have ever seen one - trans-gender, trans-age, so lets not forget then about transclusion! If your not familiar with transclusion in angular then go and read about it. I’ll wait. So you have mastered making reusable components, and now you want to transclude components but still be able to use the goodies (read functions) outside the transcluded component? Cause, you as well as I wanna make stateless stupid components. Well you’ve come to the right place! Examples you say!? <search> <search-filters> <search-filter name="Filter"> <filter></filter> </search-filter> </search-filters> </search> Lets say our component is a...

Angular .component() $doCheck lifecycle event

I will assume you are already aware of the awesomeness that is angular components. Even if it is just sugary coating around the directive, it’s still sweet. So to wrap up the events we have had at our finger tips thus far. $postLink $onInit $onChanges $onDestroy I dont know where I stumbled upon the latest one, but I did. Let this be your stumbling ground! #$doCheck() This is a nifty little event - introduced to us in Angular v1.5.8 - allows us to fire off a method on each turn of the digest cycle. As per the docs it provides...

Service Worker Precache

Service worker is probably one of the coolest new additions in the sea of cool new additions to the world of Front-End Development. It is however a pretty daunting API to get a hold of when you are starting out with it - fetch, cache, oh boy. The simplest way to get started with integrating service worker is to precache all your static files - aka the JS, CSS and and assets you might have. Now this presents a problem. What about when the assets change does that mean we need to manually maintain this file? That seems like a...
pow wow!