Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nguniversal/builders

Package Overview
Dependencies
Maintainers
2
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nguniversal/builders

Angular Universal builders package

  • 16.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
46K
decreased by-0.23%
Maintainers
2
Weekly downloads
 
Created
Source

Angular Universal Builders

Angular Universal comes with some custom Builders. All Parameters are also specified in their schema.json file.

Builders

  • prerender
  • ssr-dev-server
  • static-generator

Prerender

Description

This builder is used to prerender pages of your application. Prerendering is the process where a dynamic page is processed at build time generating static HTML.

For more information about this see: https://angular.io/guide/prerendering

Use this if you want to serve fast Pages, where you don't have changing Content on each request.

Options

NameType of ValueDescriptionRequired
browserTargetPattern: ^[^:\s]+:[^:\s]+(:[^\s]+)?$Target to build.✔️
serverTargetPattern: ^[^:\s]+:[^:\s]+(:[^\s]+)?$Server target to use for prerendering the app.✔️
routesFileA Filename - Attention no schema validation!The path to a file containing routes separated by newlines.
routesUnique StringsThe routes to render.
guessRoutesBolean (default: true)Whether or not the builder should extract routes and guess which paths to render.
numProcessesNumber (min: 1, default: 1)The number of cpus to use. Defaults to all but one.

SSR Dev Server

Summary

This command is similar to ng serve, which offers live reload during development, but uses server-side rendering. The application runs in watch mode and refreshes the browser after every change. This command is slower than the actual ng serve command.

Attention: This builder is only for local development.

Options

NameType of ValueDescriptionRequired
browserTargetPattern: .+:.+(:.+)?Target to build.✔️
serverTargetPattern: .+:.+(:.+)?Server target to build.✔️
hoststring (default: localhost)Host to listen on.
portnumber (default: 4200)Port to start the development server at. Default is 4200. Pass 0 to get a dynamically assigned port.
publicHoststringThe URL that the browser client should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies.
openboolean (default: false)Opens the url in default browser.
progressboolean (default: true)Log progress to the console while building.
inspectboolean (default: false)Launch the development server in inspector mode and listen on address and port '127.0.0.1:9229'.
sslboolean (default: false)Serve using HTTPS.
sslKeystringSSL key to use for serving HTTPS.
sslCertstringSSL certificate to use for serving HTTPS.
proxyConfigstringProxy configuration file.

Static Generator

Description

This builder is used to prerender pages of your application using the experimental Clover implementation. Prerendering is the process where a dynamic page is processed at build time generating static HTML.

Attention: Use this if you don't have any server side Code - as "serverTarget" is not configurable.

Option

NameType of ValueDescriptionRequired
browserTargetPattern: ^[^:\s]+:[^:\s]+(:[^\s]+)?$Target to build.✔️
routesFilestringThe path to a file containing routes separated by newlines.
routesarray of Unique StringsThe routes to render.
guessRoutesboolean (default: true)Whether or not the builder should extract routes and guess which paths to render.
numProcessesnumber (min: 1, default: 1)The number of cpus to use. Defaults to all but one.

Keywords

FAQs

Package last updated on 11 Aug 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc