Aurelia Dynamic Views From Strings Using InlineViewStrategy

The flexibility of Aurelia means there are many ways to achieve a task. The default convention of view/view-model will meet your needs a lot of the time, but sometimes you might need a little more power. You might already know of the ability to define views inline (inside of your view-models) using the inlineView decorator, … 

 

Efficiently Looping A Javascript Array Backwards

Most of the time when you’re looping over an array of elements, you’ll do it sequentially. However, I recently needed to iterate through an array of objects in reverse just using a plain old for loop. This will not be a highly informative or groundbreaking post but, I thought I’d share this in case someone … 

 

Configuring Git Pre Commit Hook And TSLint (automatically)

If you’re a TypeScript user and you’re reading this, then you’re using TSLint (most likely). Recently, a situation at work arose where even though TSLint warnings were being thrown in the editor as well as terminal output, some developers (tsk tsk) were still committing these warnings. Naturally, a pre-commit Git hook is the right candidate … 

 

Static Inject vs @inject In Aurelia

A few people have actually asked me this question, so I thought a helpful blog post for reference would finally answer the question: What’s the difference between static inject and @inject in Aurelia? The answer will surprise you. Okay, not really. It’s a pretty clear-cut answer. There is no difference between either. Back in the … 

 

Sneak Peak: Aurelia Markdown Editor

As many of you know, I have been working on an in-progress book on Aurelia titled Aurelia For Real World Applications for quite a while now. Good news! the book is finally nearing its release and I’ve actually started working on the example applications chapter (amongst the others still in progress). This is probably the … 

 

Code Splitting Your Aurelia Webpack Applications

Newly released under a release candidate (I’ll update this when it’s out of RC), is better support for Webpack in Aurelia. We won’t be detailing how to setup a new Webpack application, but how you can leverage code splitting to reduce the size of your application. If you would like to know how to create … 

 

Creating a Minimal Aurelia TypeScript & Webpack Application From Scratch

Today we are going to be creating a Webpack based Aurelia application from scratch. We will be leveraging the newly released Webpack capabilities for this tutorial. Until such time that the Aurelia CLI allows us to build customisable Webpack builds from scratch, we will be doing it manually. A great opportunity to familiarise yourself with … 

 

Dealing With Tslint Errors/Warnings In Third Party Files

This might be a bit of an edge case for some, but recently I needed to use a third-party script in my Aurelia TypeScript application that wasn’t installable through Npm. I could have carefully changed it to conform to my TSLint guidelines, but that would have been more effort than I wanted to spend. I … 

 

Polyfilling Promises Using Bluebird in Webpack 2

Surprisingly, whilst determining the best way to polyfill promises in a Webpack build and using Bluebird I came across such mixed results. A lot of the posts out there don’t mention Bluebird at all, opting for es6-promise when it has been proven Bluebird has such great performance, it’s even faster than native promises in some … 

 

Yarn Slow In Windows? Disable Windows Defender

I switched to Yarn a while ago, because Npm is incredibly limited. And while I enjoy fast speed on macOs and Linux, Windows has always been a bit slow. I never actually thought to investigate the issue until one frustrated evening, I had the task manager open and noticed Windows Defender was going crazy when …