Aurelia: CLI versus Skeletons

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).

One response to “Aurelia: CLI versus Skeletons”

  1. Charles Odili says:

    Thanks for sharing this insight on how and when to use the CLI vs the skeletons. I fall in love with Aurellia each time I look at it or read about it, but I have not been lucky to get off the ground with it, especially with the CLI.

    After I set up a new project with the CLI, “au run” just seems to crash after I install a new dependency, e.g JQuery or Bootstrap.

    Have you experience this?

    node -v = v6.11.2
    npm -v = v5.7.1
    au -v = 0.33.1

Leave a Reply

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