mudbath
DIGITAL /

NEWCASTLE (HQ)

MELBOURNE

BRISBANE

SYDNEY

Angular CLI

June 17 - Tom Hanlon

With the introduction of Angular 2 we were also gifted with Angular CLI, a command line interface for creating Angular projects. Angular CLI is a simple tool installed via NPM that allows you to get a full fledged Angular project up and running within minutes.

So what makes Angular CLI great? Well up until now we haven’t had any real contenders within the Angular space. Additionally the ideal Angular 2 development setup is far more complex than its predecessor now that it’s leveraging Webpack and Typescript.

But with all those changes comes a level of complexity, we now have to compile, bundle and serve those bundles. This is where Angular CLI really starts to shine, it can provision a zero configuration required project that handles everything, including the Typescript and Webpack configuration!

The good news here, is that all these new bells and whistles provide a much smoother and streamlined development process. Typescript provides us with a lot of the benefits of a fully typed language, and allows us to compile to various ECMAScript versions. Whilst Webpack provides a heavily improved build and bundling process, whilst allowing you to save stacks of time when developing by leveraging Hot Module Replacement.

With a few simple and optionally configurable commands, Angular CLI provides you with the tools to do the following:

  • Create project - with all project folders and scaffolding to boot
  • Add additional components, routes, services and pipes
  • Run a local development server - with Hot Module Replacement out of the box
  • Build - with multiple target environments

The Angular ecosystem has been rapidly maturing and stabilizing over the past few months. For those of you that haven’t given Angular a look, now is a better time than ever to test the waters, check out the links below to get started.

Just recently Angular CLI had its first non-beta release, version 1.0. Release 1.0 promised improved build time and performance, and absolutely delivered. Internally we’ve seen build times almost halved in comparison to Beta 28.

 

https://cli.angular.io/

https://github.com/angular/angular-cli/wiki/stories-1.0-update

https://www.typescriptlang.org/

https://webpack.github.io/