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).
Ads have never sat well with me. For a while I have had them on this blog, because it gets a lot of traffic. However, inspired by Troy Hunt, I have decided to remove the Google ads and instead start a Patreon page where anyone can pay a monthly amount to “sponsor” me.
By no means are you under obligation to sponsor me. I realise the economy isn’t so kind to everyone, but for those who see the value in my content and would like to see more created on a regular basis, this is your chance.
Update: Site is operational and working again.
The last couple of months this blog has grown tremendously. Even though I have caching and other performance tweaks in place, the server my site runs on is surprisingly barebones.
The traffic to this blog is around 100k visitors per month, the single core CPU just wasn’t cutting it anymore and a dreaded memory leak with caching that seemingly wouldn’t go away no matter how many times I tried to fix it.
When you think of the new version of Angular, you think of it as Angular 2. Every article you read about the follow-up to Angular 1.x refers to it as Angular 2.0.
Well, this might come as a surprise to some, but the Angular team released their December 12th meeting notes and contained within them, are some interesting tidbits which could have massive consequences.
The Angular team are dropping the version number. From here on in, Angular 2 will be known as Angular. They’re releasing two major versions per year. I believe this was mentioned a while back, but in all honesty, most people probably aren’t aware of the change.
When it comes to frameworks and libraries, developers have never had so much choice. So understandably, it can be hard to convince a developer one option is better than the other.
Most front-end developers who have been around for at least 4 or 5 years most likely have the same backstory, going from jQuery to Angular, then possibly ReactJS shortly after.
Admittedly Aurelia isn’t supported by a mega-corp with endless troves of cash, but that doesn’t mean it isn’t worthy of being at the top. The Aurelia framework is backed by a company founded by Rob Eisenberg which funds itself through consulting, workshops and paid training materials.