Upgrade to Pro — share decks privately, control downloads, hide ads and more …

deploying_angular.pdf

John Papa
March 02, 2018
56

 deploying_angular.pdf

John Papa

March 02, 2018
Tweet

Transcript

  1. Add routing Set your prefix Define your styles Verify the

    flle names This is just the beginning ng new my-app --routing --prefix ma --style scss --dry-run Scaffold a new Angular App @john_papa
  2. $ ng build Development build Consider the Personas When we

    Build $ ng build --prod --build-optimizer Production builds Minified, optimized, cache busting @john_papa
  3. Environment environment.prod.ts ng build --prod --build-optimizer Cache-busting all build files

    Source maps not generated Uglification yes Bundling yes environment.ts ng build only images referenced in css generated no yes Code Splitting yes AOT yes yes no Tree Shaking yes no @john_papa
  4. Tools to Analyze and Optimize $ ng build --prod --stats-json

    $ webpack-bundle-analyzer dist/stats.json Generate webpack statistics Analyze the statistics Optimized build with source maps Analyze the source $ ng build --prod --sm $ source-map-explorer dist/main.xxx.js https://www.npmjs.com/package/source-map-explorer https://www.npmjs.com/package/webpack-bundle-analyzer @john_papa
  5. Dockerfile 2 1 Provides a recipe for creating and running

    our app Self contained script @john_papa
  6. Dockerfile 3 2 1 Configurable to adapt to different environments

    Provides a recipe for creating and running our app Self contained script @john_papa
  7. VS Code tooling makes it all easier Key Points Docker

    makes it run “everywhere” JavaScript CLIs optimize the builds 3 2 1 @john_papa