Aurelia CLI Adventures

About Aurelia CLI

Aurelia CLI is a desktop tool using the command line interface (yes, that thing from the anciant past that recently became omnipresent) to build a setup that Aurelia supports out-of-the-box.

About this book

It is expected that current collection of Aurelia Navigation Skeletons will soon be replaced with the equivalent code - generated by a future version of Aurelia CLI. In order to better support building of non-trivial Aurelia app, this book explains in details how to create such applications with the current Aurelia CLI and how to augment the generated code so that the final result is still an Aurelia CLI compatible application, responding to commands like au build, au run etc.

All samples in this book illustrate the process of manual, incremental building of several, relatively complex samples starting with the Basic CLI application - application that the current Aurelia CLI (version 0.32.0) generates from the scratch.

This text is not a replacement for the more comprehensive document Learn how to get setup with the Aurelia CLI and use its basic capabilities. Instead, formatted as a Gitbook book it is written for all Aurelia users that have discovered the elegance and usefulness of the Aurelia CLI command line tooling and are finding the existing amount of related documentation insufficient for their needs.

All Aurelia Tools Team's "Adventure books" share common set of associated samples - since a single sample can be used to explain the methods and practice for a specific development tool (like CLI in this case) or Typescript in Aurelia Typescript Adventures well as methods for application continuous deployment and testing in CI - CD for Aurelia applications. Based in its title, each book will highlight different aspects of the sample used as the illustration for book's chapters - while eventually all this information might be added to the Aurelia HUB.

Samples used in this book are here

Check the README for details of the organization of this repository.

On yarn versus npm

Several more involved applications like Navigation esnext KendoUI or its Typescript equivalent Navigation Typescript KendoUI which require adding a few additional third party libraries, often misbehave when using npm module manager. We start building this sample by using the finished version of the Navigation esnext, with this package.json. In order to build this sample, we start with

npm install

and then have to follow with:

npm add @progress/kendo-ui --save

More often than not, this last command results with

λ npm add @progress/kendo-ui --save
npm ERR! path C:\work\aurelia-tools\cli-based-skeletons\cli-esnext\esnext-navigation-skeleton-kendoui\node_modules\npm\node_modules\dezalgo
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\work\aurelia-tools\cli-based-skeletons\cli-esnext\esnext-navigation-skeleton-kendoui\node_modules\npm\node_modules\dezalgo' -> 'C:\work\aurelia-tools\cli-based-skeletons\cli-esnext\esnext-navigation-skeleton-kendoui\node_modules\npm\node_modules\.dezalgo.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\nik\AppData\Roaming\npm-cache\_logs\2017-12-28T21_47_15_061Z-debug.log

There are literally hundreds of reports of this problem (like this one, often atttributed to Visual Studio Code locking some files that npm needs to modify, or to some visrus checker, etc). I am pretty sure that this is a long present npm bug, so I recommend using yarn instead (as in Navigation esnext KendoUI for example).

results matching ""

    No results matching ""