New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@flowaccount/scully-plugin-angular-delay

Package Overview
Dependencies
Maintainers
4
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flowaccount/scully-plugin-angular-delay

I wrote this as an :paperclip: `angular-paperclip` :paperclip: experiment from the talk by **Misko Hevery (@mhevery)** from the [Keynote in NGCONF 2019](https://nitayneeman.com/posts/all-talks-from-ng-conf-2019/#keynote-1)

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
117
decreased by-13.33%
Maintainers
4
Weekly downloads
 
Created
Source

scully-plugin-angular-delay

I wrote this as an :paperclip: angular-paperclip :paperclip: experiment from the talk by Misko Hevery (@mhevery) from the Keynote in NGCONF 2019

It is to help demonstrate the power of Resuming states when rendering angular applications on the client-side which is already pre-rendered from the server-side. In this case, using scully.

By delaying the Angular application from bootstrapping, I am allowing clients to interact with the site before rendering the Angular javascript codes, hence reducing the Time to interaction metrics for performance calculated by lighthouse.

However the states to be resume have to be manually put in by using State Decorators

Read more at this article --> Angular Paperclip Experiment

Installation

To install this library with npm run

npm install @flowaccount/scully-plugin-angular-delay --save-dev

or with yarn

yarn add @flowaccount/scully-plugin-angular-delay --dev

Usage

  • Add this to your scully.config.ts file
import { getDelayAngularPlugin } from '@flowaccount/scully-plugin-angular-delay';

const postRenderers = [
  getDelayAngularPlugin({
    routesBlacklist: [
      { route: '/pricing', removeAngular: false },
      { route: '/functions', removeAngular: true }
    ],
    delayMilliseconds: 1500
  })
];

export const config: ScullyConfig = {
  routes: {},
  defaultPostRenderers: postRenderers
};
  • If your tsconfig or dist folder lives outside of the scully project root, you can specify the paths
const postRenderers = [
  getDelayAngularPlugin({
    tsConfigPath: '../../tsconfig.json',
    distFolder: '../../dist/app'
  })
];

Build your app with the --stats-json flag enabled as the plugin needs to know which assets have been build for your app. Then just run the Scully command.

yarn ng build --configuration=prod --stats-json
yarn scully

This is an adaptation from scully-plugin-disable-angular

Keywords

FAQs

Package last updated on 17 Jul 2020

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