The Angular Developer's Nx Handbook
Free!
Minimum price
$7.99
Minimum paid price

The Angular Developer's Nx Handbook

About the Book

This free book about the Nx build framework targets Angular developers. It assumes familiarity with the Angular CLI to use common concepts and compare them to equivalents or replacements included in the Nx CLI.

The Angular Developer's Nx Handbook is a curated guide to essential Nx concepts, principles, and features. We learn to use Nx to build features for a real-world Angular application.

We start our Nx Angular journey by generating a workspace from scratch. After exploring the contents of a freshly generated Nx workspace, we go through the Nx CLI commands that are similar to or replacements for Angular CLI commands. Next, we discuss the unique commands offered by the Nx CLI.

Following Nx CLI commands, we learn about the important Nx library concepts library traits and library types.

With an understanding of Nx library concepts in place, we start work on Gitropolis, a GitHub clone using GitHub's Primer design system, the GitHub REST API via Octokit, RxAngular for state management, an improved developer experience, and optimized rendering.

The book uses the latest tooling, conventions, and best practices.

We develop Gitropolis using:

  • An Angular standalone application
  • Angular standalone components
  • Angular version 14 or 15
  • Nx version 14 or 15
  • GitHub Actions

Still to come:

  • Advanced Nx CLI commands
  • The Nx project graph
  • Project tags
  • Grouping directories
  • Nx plugins
  • A CI workflow using GitHub Actions
  • Migrating from an existing Angular CLI workspace

About the Author

Lars Gyrup Brink Nielsen
Lars Gyrup Brink Nielsen
  • Co-Founder of This is Learning
  • Organizer of AarhusJS
  • Tech Writer, Tech Speaker, FOSS Maintainer
  • Microsoft MVP in Developer Technologies
  • GitHub Star
  • Author of Accelerating Angular Development with Ivy
  • Principal Frontend Engineer

Table of Contents

  • Introduction
  • Creating an Nx workspace
    • Using the create-nx-workspace command
    • Creating an Angular CLI workspace for comparison
    • Conclusion
  • Exploring a fresh Nx Angular workspace
    • Comparing top-level files
    • Comparing top-level directories
    • Introducing solution-style TypeScript configurations
    • Conclusion
  • Feeling right at home with familiar Nx CLI commands
    • create-nx-workspace is like ng new
    • nx build to build projects
    • nx serve to start a development server
    • nx generate to generate code
    • nx generate instead of ng add
    • nx lint to lint source files
    • nx test to run unit tests
    • nx e2e to run end-to-end tests
    • nx run to run any target in a project
    • nx deploy to deploy a project
    • nx extract-i18n to extract internationalization texts
    • nx migrate instead of ng update
    • nx report instead of ng version
    • nx analytics to configure usage metrics
    • nx doc to search the Angular documentation
    • nx - -help to list parameters and examples for commands
    • Conclusion
  • Cleaning up the application project
    • Deleting the Nx welcome component
    • Converting the root component to a standalone component
    • Conclusion
  • Choosing library traits
    • Workspace libraries
    • Buildable libraries
    • Publishable libraries
    • Conclusion
  • Picking a library type
    • Application concerns
    • Data access libraries
    • UI libraries
    • Feature libraries
    • Utility libraries
    • Test utility libraries
    • End-to-end test utility libraries
    • Domain libraries
    • Conclusion
  • Creating a feature library
    • Creating a feature library
    • Listing organization repositories
    • Conclusion
  • Creating a data access library
    • Creating a data access library
    • Adding Octokit REST
    • Introducing the abortable operator
    • Implementing the repository API service
    • Creating a repository domain model
    • Adding RxAngular State
    • Implementing the repository state service
    • Conclusion
  • Loading repositories dynamically
    • Connecting the organization route parameter to the repository state
    • Passing an organization’s repositories from the repository state
    • Accepting a repository domain object
    • Passing a dynamic list of repository topics
    • Optimizing the topics list visually
    • Conclusion

The Leanpub 60-day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $12 million USDwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub