This package has been deprecated

Author message:

The module is deprecated, please use @angular-builders/custom-webpack and @angular-builders/dev-server instead

angular-builders
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

angular-cli-builders

A set of additional builders for angular-cli

Prerequsits:

  • Angular CLI 6
  • @angular-devkit/architect >= 0.7.0-rc.0
  • @angular-devkit/build-angular >= 0.7.0-rc.0
  • @angular-devkit/build-webpack >= 0.7.0-rc.0

Usage

  1. npm i -D angular-cli-builders
  2. In your angular.json:
    ...
    "architect": {
           ...
           "[architect-target]": {
                     "builder": "angular-builders:[name-of-builder]"
                     "options": {
                           ...
                     }
    
    Where:
    • [architect-target] is the name of build target you want to run (build, serve, test etc.)
    • [name-of-builder] one of the supported builders (specified below)
  3. ng [architect-target]

## For example

  • angular.json:
    "architect": {
        ...
        "build": {
                  "builder": "angular-builders:custom-webpack-browser"
                  "options": {
                        ...
                  }
    
  • Run the build: ng build

Builders

custom-webpack-browser

Extended @angular-devkit/build-angular:browser builder that allows to specify additional webpack configuration (on top of the existing under the hood).
The builder will run the same build as @angular-devkit/build-angular:browser does with extra parameters that are specified in the provided webpack configuration.

Options:

  • All the @angular-devkit/build-angular:browser options
  • webpackConfigPath: path to the extra webpack configuration, defaults to webpack.config.js

angular.json Example:

"architect": {
    ...
    "build": {
              "builder": "angular-builders:custom-webpack-browser"
              "options": {
                     "webpackConfigPath": "./extra-webpack.config.js",
                     "outputPath": "dist/my-cool-library",
                     "index": "src/index.html",
                     "main": "src/main.ts",
                     "polyfills": "src/polyfills.ts",
                     "tsConfig": "src/tsconfig.app.json"
              }

custom-webpack-server

Extended @angular-devkit/build-angular:server builder that allows to specify additional webpack configuration (on top of the existing under the hood).
The builder will run the same build as @angular-devkit/build-angular:server does with extra parameters that are specified in the provided webpack configuration.

Options:

  • All the @angular-devkit/build-angular:server options
  • webpackConfigPath: path to the extra webpack configuration, defaults to webpack.config.js

angular.json Example:

"architect": {
    ...
    "build": {
              "builder": "angular-builders:custom-webpack-server"
              "options": {
                     "webpackConfigPath": "./extra-webpack.config.js",
                     "outputPath": "dist/my-cool-library",
                     "index": "src/index.html",
                     "main": "src/main.ts",
                     "polyfills": "src/polyfills.ts",
                     "tsConfig": "src/tsconfig.app.json"
              }

Package Sidebar

Install

npm i angular-builders

Weekly Downloads

76

Version

1.0.0

License

MIT

Unpacked Size

34.2 kB

Total Files

22

Last publish

Collaborators

  • meltedspark