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

@angular-toolkit/init

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular-toolkit/init

Angular Universal PWA boilerplate for serverless environment.

  • 2.2.0-beta.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by500%
Maintainers
1
Weekly downloads
 
Created
Source

Maintainability Test Coverage Build Status Dependency Status Backers on Open Collective Sponsors on Open Collective npm version

Angular 5/6 Universal Progressive Web App - starter Tweet

angular-universal-PWA report

Star it and share with others!

This repo is the boilerplate for (PWA) progressive web app with Angular Universal (serverside rendering). It is prepared to be easily deployed on serverless environment (Google Cloud Functions & AWS Lambda supported).

Live demo

Angular Universal PWA on AWS Lambda + API Gateway

Content

What's inside?

  • PWA - content is cached and available offline, it can be also installed as native app on Android devices and Google Chrome
  • AMP - Accelerated Mobile Pages - super fast initial load (down to ~650ms)
  • Push notifications:
  • Server-side rendering with Angular Universal
  • TransferState
  • Lazy loading modules
  • External modules (You can split your application into multiple projects and lazy-load them, read more here) [TBD after CLI merge - #150]
  • Angular Material
  • Unit tests
  • Firebug Lite (great solution for development on touch-screen devices, ie: tablets)

Used frameworks/technologies

  • Angular 5.x & 6.x
  • Angular CLI 1.x & 6.x
  • Webpack
  • Serverless framework

Get Started

Using Angular CLI schematics

npm install -g angular-universal-pwa

Create project:

ng new --collection angular-universal-pwa myApp
cd myApp
npm start
CLI params
  • --provider - What serverless provider you want to use? (aws | gcloud | both) - default both
  • --gaTrackingCode - Provide your Google Analytics tracking code, to enable GA (ie --gaTrackingCode UA-123456)
  • --firebug - Decide if you want to download firebug-lite (true | false) - default false

Cloning the repo

git clone https://github.com/maciejtreder/angular-universal-pwa.git
cd angular-universal-pwa/application
npm install
npm start

##Running modes

  • Development mode (autoreload only): npm start
  • Development mode (autoreload + unit tests): npm run build:dev
  • Development mode (autoreload + firebug lite): npm run build:firebug
  • Development mode (autoreload + firebug lite + unit tests): npm run build:dev:firebug
  • Unit tests: npm run test

Deployment

Production mode with Node.JS

npm run build:prod
npm run server

Serverless environments

AWS Lambda
ng new --collection angular-universal-pwa myApp
npm run build:deploy:aws

or (since 2.0.0-beta.4)

ng new --collection angular-universal-pwa myApp --provider aws
npm run build:deploy
Google Cloud Functions
ng new --collection angular-universal-pwa myApp
npm run build:deploy:gcloud

or (since 2.0.0-beta.4)

ng new --collection angular-universal-pwa myApp--provider gcloud 
npm run build:deploy

To do

Won't implement:

  • load static content from S3 (JavaScript, styles, images):
    • when serving all static content from S3 load speed up is not really visible (increase is around ~0,2 sec),
    • problems with CORS on Chrome,
    • problems with compression of some files (.js files are not compressed in some cases)
    • needs a lot of manual setup (cloudfront setup etc.)

Looking for something more?

Feel free to create issue with your feature request

Funding

You can support development of this project via Open Collective, Donorbox, Liberapay,

Open Collective Backers

Thank you to all our backers! 🙏 [Become a backer]

Open Collective Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Credentials

Keywords

FAQs

Package last updated on 12 May 2018

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