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 for this. Being able to run TSLint to ensure that before a developer can even commit let alone push, only valid code conforming to the tslint.json file can be pushed.
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 early days of Aurelia before support for decorators was added (we are talking early 2015 here), you did things a little more verbosely because support for decorators was non-existent.
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 most anticipated chapter of the entire book for many readers.
One of those applications is a Markdown Editor that you can see running here. Shortly, owners of the book will be able to obtain the source code to this application and numerous other apps.
In this article 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 a new Webpack application capable of supporting code splitting, this post has you covered.
This will be a rather quick post, no advanced concepts to learn or remember here.
What is code splitting? It’s a fancy term describing how you can break parts of your application into smaller Javascript bundles. Instead of having one massive Javascript file that contains your application and dependencies, you take parts of your app and split it into smaller files (sharing the load).
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 how Aurelia and Webpack work without relying on tools and skeletons.
Once you have your prerequisites, getting an application ready to build off of takes about 5 minutes. Not too shabby considering we’re doing everything manually and from scratch, right?
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 just wanted to include the file in a vendor folder and then import it without worrying how it’s written, whether it uses single or double quotes or what indentation setting it uses.
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 browsers.
A lot of the results I found were from 2015 and a couple in 2016. As you know, front-end development moves rapidly and 2015 is 100 years in front-end land.
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 I was doing a yarn install on a pulled down SPA app.
Turns out disabling Windows Defender halved the amount of time it took to not only resolve dependencies but link them from the local cache.
I know, I said another side project would be coming in February, but I have created another quick little Aurelia side project for January.
Introducing tempfile.cloud a temporary file storage service using Aurelia, Node.js and Amazon S3.
I find most free temporary file services are horrible, the limits are too small and they’re littered with inappropriate ads and pop up windows that tell you that your machine is infected.
I wanted a simple way to share files that didn’t require Dropbox or a dodgy third party service. The site does have ads, but only two of them in the sidebar (quite unobtrusive).
I’ve made it a kind of New Years Resolution to build little silly, niche apps in 2017 and onwards. And doing what I said I would do, I have built something silly for January.
My first app is a band name generator called namemyband.net.
The premise is simple, you get a random band name. If you’re not happy with it, you click the blue link to get another. It’s not perfect, but it was a quick app built using Aurelia (did you expect anything less).