Aurelia: CLI versus Skeletons

Last updated: March 7, 2018

I have been asked this question a few times and it can be hard to see things from the perspective of a newcomer to Aurelia, given how long I have been working with it. What is obvious to me is not obvious to everyone else.

When you’re deciding to build an Aurelia application, you’ll discover there is a CLI tool called Aurelia CLI and on Github, a collection of different skeleton applications for building an Aurelia application (preconfigured with testing, some routes and other logic).
The answer to this isn’t scientific, you should choose the CLI. The skeletons are representative of a time when Aurelia didn’t have a CLI, when it was still in alpha, beta and release candidate stages.

The CLI exists to replace the skeletons as a starting base for a new Aurelia application. You get to decide what bundler you want to use, what language you write in, whether or not you want testing and so on.

Going forward the already quite flexible CLI is going to see some great improvements, namely dropping shortly is Webpack being the default bundler of choice and a few other various improvements (including Webpack 4).

What if I want to use the skeletons?

The skeletons are still a fine starting base for building Aurelia applications off of. However, they seemingly get updated less than the CLI does and they require knowledge of configuring build tools and processes if you want to change things like preprocessors or languages.

I think the skeletons serve a great purpose of showing you how a basic Aurelia application with routing and HTTP requests is put together, as well as integrating libraries like Bootstrap, jQuery and Font Awesome.

If you do decide to choose one of the skeletons, be prepared to do some work to remove a bunch of dependencies and code you do not need in your app. In comparison, the CLI gives you an app that has nothing in it (except the required framework and tooling dependencies).

Purchase Aurelia for Real World Applications over at Leanpub now




Leave a Reply

Your email address will not be published. Required fields are marked *