ScarletFlash / ng-builders

Multi-purpose CLI Builders for Angular

Home Page:https://www.npmjs.com/package/ng-builders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi-purpose CLI Builders for Angular

⚠️ Note: this project is not affiliated with Angular Core Team members.

Contents

Installation & Usage

Install package via your package manager:

NPM
npm install ng-builders --save-dev
Yarn
yarn add ng-builders --dev

Attach required Builder to the project in angular.json:

// angular.json
{
  ...
  "projects": {
    "my-very-best-angular-project": { // πŸ‘ˆ your project name
      "architect": {
        "lint-circular-deps": { // πŸ‘ˆ CLI command name
          "builder": "ng-builders:circular-dependencies-linter", // πŸ‘ˆ required builder
          "options": {
            ... // πŸ‘ˆ builder-specific options
          }
        }
      }
    }
  },
  ...
}

You may find all Builder-specific docs next to Builder sources, in README.md. The list of all bundled and planned Angular Builders goes here.

Now, you may run configured Builder manually with this command:

ng run my-very-best-angular-project:lint-circular-deps

You may find it useful to add short alias for this command in package.json:

// package.json
{
  ...
  "name": "my-very-best-angular-project",
  "scripts": {
    "lint": "npm run lint:eslint && npm run lint:circular-deps",
    "lint:eslint": "ng lint",
    "lint:circular-deps": "ng run my-very-best-angular-project:lint-circular-deps",
  },
  "devDependencies": {
    "ng-builders": "latest",
  },
  ...
}

Included Builders

Builder More Info
Circular Dependencies Linter README.md
Formatter (planned)
Linter (planned)
Codebase migration tool (planned)

About

Multi-purpose CLI Builders for Angular

https://www.npmjs.com/package/ng-builders

License:MIT License


Languages

Language:TypeScript 100.0%