New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@flatxph/angular-builders

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flatxph/angular-builders

Customized Builders for Angular

latest
Source
npmnpm
Version
0.0.0
Version published
Maintainers
1
Created
Source

Builders

These are customized builders to make node development easier on the latest angular cli.

Environment Builder

This builds an environment file that supports path variables for easier deployment to cloud providers.

To use this builder, do the following:

  • Create a build.ts file with the following format:
export default const environment = {
    production: process.env.PRODUCTION || false,
    ...
    <variable>: process.env.<VARIABLE> || <default value>
    ...
}
  • On the angular.json, import this as an architect with the following options:

  • An example of this is:

Architect for angular.json

    "environment": {
        "options": {
            model: "Environment";
            modelPath: "./src/environments/model";
            filename: "environment.prod.ts";
            path: "./src/environments/";
            builder: "./src/environments/builder";
        }
    }

File for build.ts

export default const environment = {
    production: process.env.PRODUCTION || false,
    maps: {
        apiKey: process.env.MAPS_API_KEY,
        libraries: process.env.MAPS_LIBRARIES ? process.env.MAPS_LIBRARIES.split(',') : [],
    }
}

Output file environment.prod.ts

export default const environment: Environment = {
}

Keywords

angular

FAQs

Package last updated on 12 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts