Giter VIP home page Giter VIP logo

nx's Introduction

Build Status License NPM Version NPM Downloads Semantic Release Commitizen friendly Join the chat at https://gitter.im/nrwl-nx/community


Nrwl Connect platform


What is Nx?

πŸ”Ž Nx is a set of Angular CLI power-ups for modern development.

Nx Helps You

Use Modern Tools

Using Nx, you can add Cypress, Jest, Prettier, and Nest into your dev workflow. Nx sets up these tools and allows you to use them seamlessly. Nx fully integrates with the other modern tools you already use and love.

Build Full-Stack Applications

With Nx, you can build full-stack applications using Angular and Node.js frameworks such as Nest and Express. You can share code between the frontend and the backend. And you can use the familiar ng build/test/serve commands to power whole dev experience.

Develop Like Google

With Nx, you can develop multiple full-stack applications holistically and share code between them all in the same workspace. Nx provides advanced tools which help you scale your enterprise development. Nx helps enforce your organization’s standards and community best practices.

A la carte

Most importantly, you can use these power-ups a la carte. Just want to build a single Angular application using Cypress? Nx is still an excellent choice for that.

Does it replace Angular CLI?

Nx is not a replacement for Angular CLI. An Nx workspace is an Angular CLI workspace.

  • You run same ng build, ng serve commands.
  • You configure your projects in angular.json.
  • Anything you can do in a standard Angular CLI project, you can also do in an Nx workspace.

Getting Started

Creating an Nx Workspace

Using npx

npx create-nx-workspace myworkspace

Using npm init

npm init nx-workspace myworkspace

Using yarn create

yarn create nx-workspace myworkspace

Adding Nx to an Existing Angular CLI workspace

If you already have a regular Angular CLI project, you can add Nx power-ups by running:

ng add @nrwl/schematics

Creating First Application

Unlike the CLI, an Nx workspace starts blank. There are no applications to build, serve, and test. To create one run:

ng g application myapp

The result will look like this:

<workspace name>/
β”œβ”€β”€ README.md
β”œβ”€β”€ angular.json
β”œβ”€β”€ apps/
β”‚Β Β  β”œβ”€β”€ myapp/
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ browserslist
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ jest.conf.js
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ src/
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ app/
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ assets/
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ environments/
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ favicon.ico
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ index.html
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ main.ts
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ polyfills.ts
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ styles.scss
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── test.ts
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ tsconfig.app.json
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ tsconfig.json
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ tsconfig.spec.json
β”‚Β Β  β”‚Β Β  └── tslint.json
β”‚Β Β  └── myapp-e2e/
β”‚Β Β   Β Β  β”œβ”€β”€ cypress.json
β”‚Β Β   Β Β  β”œβ”€β”€ src/
β”‚Β Β   Β Β  β”‚Β Β  β”œβ”€β”€ fixtures/
β”‚Β Β   Β Β  β”‚Β Β  β”‚Β Β  └── example.json
β”‚Β Β   Β Β  β”‚Β Β  β”œβ”€β”€ integration/
β”‚Β Β   Β Β  β”‚Β Β  β”‚Β Β  └── app.spec.ts
β”‚Β Β   Β Β  β”‚Β Β  β”œβ”€β”€ plugins/
β”‚Β Β   Β Β  β”‚Β Β  β”‚Β Β  └── index.ts
β”‚Β Β   Β Β  β”‚Β Β  └── support/
β”‚Β Β   Β Β  β”‚Β Β   Β Β  β”œβ”€β”€ app.po.ts
β”‚Β Β   Β Β  β”‚Β Β   Β Β  β”œβ”€β”€ commands.ts
β”‚Β Β   Β Β  β”‚Β Β   Β Β  └── index.ts
β”‚Β Β   Β Β  β”œβ”€β”€ tsconfig.e2e.json
β”‚Β Β   Β Β  β”œβ”€β”€ tsconfig.json
β”‚Β Β   Β Β  └── tslint.json
β”œβ”€β”€ libs/
β”œβ”€β”€ nx.json
β”œβ”€β”€ package.json
β”œβ”€β”€ tools/
β”œβ”€β”€ tsconfig.json
└── tslint.json

All the files that the CLI would have in a new project are still here, just in a different folder structure which makes it easier to create more applications and libraries in the future.

Serving Application

Run ng serve myapp to serve the newly generated application!

You are good to go!

Quick Start & Documentation

Documentation

Books

Videos

Talks

Podcasts and Shows

Misc

Want to help?

If you want to file a bug or submit a PR, read up on our guidelines for contributing.

Core Team

Victor Savkin Jason Jean Benjamin Cabanes
Victor Savkin Jason Jean Benjamin Cabanes
vsavkin FrozenPandaz bcabanes

nx's People

Contributors

vsavkin avatar frozenpandaz avatar bcabanes avatar skydever avatar cammisuli avatar thomasburleson avatar jameshenry avatar mrmeku avatar emilio-martinez avatar jschwarty avatar dherges avatar jeffbcross avatar luchsamapparat avatar austinmatherne avatar texel avatar yonet avatar buckymaler avatar listepo-alterpost avatar peterblazejewicz avatar swseverance avatar zachjw34 avatar thillmann avatar xmlking avatar nfavero avatar mbinic avatar markphip avatar manduro avatar jaysoo avatar chumachenkovlad avatar alexeagle avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.