7
votes

I used the start kit to build my app before Aurelia was released from here : https://github.com/aurelia/skeleton-navigation

But when Aurelia was released , I wanted to check the au new --myApp and it has different structure and build methods than the skeletions.

What is the best way to go with , stay with the skeleton template or move to the CLI one .

Thanks...

2
There is no best way, currently the CLI is not stable enough for me so I use the JSPM (ESNext) skeleton. You can choose whatever you like. For me the JSPM with Gulp is the easiest solution because I have experience with those. Others will prefer webpack, and beginners might be thinking the CLI is easy to learn.Randy
Check the new version for au cli, it's awesome​ with the new features.jmvtrinidad

2 Answers

2
votes

Bit of a late answer on this one (but the right time). The Aurelia CLI is quite stable now and supports generating applications using Javascript and Typescript, with the choice of RequireJS or System.js (Webpack support is coming soon).

The difference between the skeletons and CLI projects is as follows:

Skeletons

The skeletons are kitchen sink examples showcasing testing, routing, working with an API and come with additional libraries like Bootstrap and Font Awesome. The skeletons are also the only choice currently (as of July 2017) if you want to use Webpack, but the CLI is going to support Webpack at a later date.

Aurelia CLI

The CLI is a clean starting base that lets you make your own choices like; if you want testing, what code editor you use and so on. The resulting project structure has no routing configured, no examples of fetching data from an API or anything else that you get in the skeletons. The CLI project when you first run it will just display, "Hello world" and nothing more.

If you're confident working with the documentation and like the idea of building up your applications from nothing, then the CLI is for you. You also get the convenience of generator functions which allow you to quickly bootstrap new custom elements, components, value converters and so on.

0
votes

The last version of aurelia-cli is very complete, so I think in case you don't need a very customized structure, should generate your project via CLI. Here are some of the current options you have to generate the base project:

Global aurelia-cli v1.3.1
                      _ _          ____ _     ___
  __ _ _   _ _ __ ___| (_) __ _   / ___| |   |_ _|
 / _` | | | | '__/ _ \ | |/ _` | | |   | |    | |
| (_| | |_| | | |  __/ | | (_| | | |___| |___ | |
 \__,_|\__,_|_|  \___|_|_|\__,_|  \____|_____|___|

? Would you like to use the default setup or customize your choices? … 
❯ Default ESNext App 
  A basic app with Babel and Webpack.
  Default TypeScript App 
  A basic app with TypeScript and Webpack.
  Custom App 
  Select bundler, loader, transpiler, CSS pre-processor and more.

Of course, you can customize your preferences via CLI too:

✔ Would you like to use the default setup or customize your choices? · Custom App
? Which bundler would you like to use? … 
❯ Webpack 
  A powerful and popular bundler for JavaScript.
  CLI's built-in bundler with an AMD module loader 
  Provides similar capabilities but with a much simpler configuration.

In resume, you can configure loader, CSS processors, test framework, even if you want a Dockerfile.

✔ Would you like to use the default setup or customize your choices? · Custom App
✔ Which bundler would you like to use? · Webpack
✔ Which HTTP Protocol do you wish the outputted Webpack bundle to be optimised for? · HTTP/1.1
✔ What platform are you targeting? · Web
✔ What transpiler would you like to use? · Babel
✔ How would you like to setup your HTML template? · None
✔ What css preprocessor would you like to use? · Sass
✔ Do you want to add PostCSS processing · Basic
✔ Which unit test runner would you like to use? · Karma + Jasmine
✔ Would you like to configure integration testing? · Cypress
✔ What is your default code editor? · None
✔ Which features do you want scaffolded into your project? · Navigation App
✔ Would you like to add a Dockerfile? · Sure, yes