Decorators in JavaScript 🖌️

When it comes to decorating, I’m about as useful as a flashlight in broad daylight 🔦! Play Sorry, your browser doesn't support embedded videos. (() = { const autoplay = "autoplay" === 'autoplay'; const loop = "loop" === 'loop'; const playbackRate = parseFloat("1") || 1; const replayButtonText = "Replay"; const videoId = "video-1"; const video = document.getElementById(videoId); const videoControls = document.getElementById("video-controls-1"); const playButton = document.getElementById("play-1"); const videoWorks = !...

September 21, 2023 · 4 min · Phil Static Badge

Angular Enterprise VSCode

Overview 🗒️ A quick post to share out my very own Visual Studio Code Extension Pack, Angular Enterprise! Angular Enterprise This is an extension is aimed at Angular developers looking to develop enterprise-grade applications with ease. Check it out on the VSCode Marketplace. This extension pack will continue evolve over time to include the latest and greatest but also come preconfigured with the best settings to allow you and your team to hit the ground running....

November 25, 2022 · 2 min · Phil Static Badge

E2E Testing a Video Game

The Scenario 🖼️ So you’ve successfully released a dozen popular JavaScript games over the past few years and just as you’re about to kick back, enjoy the weekend and let the revenue flow in, a new Tweet appears in your feed. Not great news to hear on a Friday. Okay, I’ll just check how many of my games are affected… main .post-content { overflow: hidden !important; } 😲😲😲😰😰 No need to panic....

June 3, 2022 · 5 min · Phil Static Badge

Visual Testing With Cypress

Setting the Scene 🖼️ It’s Friday evening, the sun is shining 🌞, you’ve just deployed the latest UI changes to production. Just as you’re about to put those feet up and order that takeaway… Those shrieking voices coming from all angles 😨; " The website isn't loading! " " The screen is completely blank!! " " We can't see anything!! " Clearly, something is amiss here. Let’s check the build…...

June 27, 2021 · 8 min · Phil Static Badge

Web scraping to create an api in 5 minutes!

Disclaimer Web scraping is a grey area - be sure to research the legality of the source you intend to scrape! Setup ⚙️ Prerequisite Presuming you have Node.js installed let’s jump right in and create the endpoint! (If you don’t head over to https://nodejs.org/en/) 5 Minutes is ambitious so let’s get moving! Setting up our server Fire up a terminal and type the code below to get a default package....

March 5, 2021 · 3 min · Phil Static Badge

Final Fantasy VIII & TypeScript

Overview 🗒️ Growing up I was an avid fan of the Final Fantasy game series. Particularly Final Fantasy 7 through 10. Each game in the series contains an in-depth story, hours of gameplay, and some mini-games. One mini-game introduced during Final Fantasy 8 was a card game known as Triple Triad. Released in 1999, Final Fantasy 8 was a single-player game and so too was Triple Triad, the included card game....

January 3, 2021 · 10 min · Phil Static Badge

My most used features in ES2020

Overview 📄 With ES2020 being finalised there have been some great new additions. I wanted to take a look at two of my most used ES2020 features and what makes them great. So let’s jump right in! Nullish Coalescing ❔❔ Nullish coalescing is a logical operator that will return its right-hand statement when the left is null or undefined. Think logical || but explicitly for null or undefined values. Consider the code below using the logical ||...

April 12, 2020 · 2 min · Phil Static Badge

Flappy Bird POC using Phaser

Overview This weekend I had a bit of time to recreate a prototype of Flappy Bird in Phaser. This was my first time really using Phaser to build and deploy a small game. The project utilised webpack and also used TypeScript (something not often used at this time within the Phaser community). Keep an eye out for some more Phaser content in the future! Preview 🎮 Try it out below using space, click or tapping to fly....

June 5, 2019 · 1 min · Phil Static Badge

Drag and drop in Angular

Overview 📄 Dragging and dropping has never been easier! Lets make use of the Component Development Kit (CDK) along with Angular 7+ to make some draggable divs in less than a minute! CDK setup ⚙️ Make sure you are on at least V7 of Angular. You can check this by running ng version from your chosen CLI (if you have the Angular CLI installed globally). Start by creating a new project....

February 1, 2019 · 1 min · Phil Static Badge

Use of the :host selector

The :host selector can be used to target custom components from within a css environment. Let’s have a look! 👁️‍🗨️ Given you have a custom component such as; <album></album> In your css you may want to style the album element from within it’s inline stylesheet. This is where the :host selector comes in handy. Consider the below usage to add 10 pixels of margin to the album element. :host { margin: 10px; }

January 9, 2019 · 1 min · Phil Static Badge