Code Monkey home page Code Monkey logo

insiderdevtour18-pwa's Introduction

Setup

  • Clone or download this repo on your local harddrive
  • Install Visual Studio 2017: https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15
  • Launch Visual Studio 2017
  • Go to "File" -> "Open" -> "Web Site..." and navigate to your folder where the repo has been copied
  • OR host the the file in node.js, IIS or your favorite way to host a webserver
  • Launch index.html in MS Edge to check the site is working as expected

Demos Script

1 - W3C Manifest

2 - Service Worker

  • Go back to PWA Builder where you left it off and go to step 2 to configure a new service worker
  • Select the "Cache-first network" option
  • Show the local version of the same PWA running
  • Press F12 in Edge and show the "Debugger" tab and then click on the "Service Workers" node to show that no service worker is currently installed
  • Go back to PWA Builder and click on the "copy" button on the top right to copy the code to register the service worker in the clipboard
  • Jump into VS Code, in the index.html page inside the if(navigator.serviceWorker) {} code block
  • Paste the registration code of the Service Worker inside this block and save the file
  • Go back to PWA Builder site and now copy the code of the service worker itself in the clipboard
  • Paste it in Visual Studio Code inside the pwabuilder-sw.js file and save it
  • Go back to the localhost version of the PWA and press F5 to refresh the page
  • In F12, show the Console tab to check that the service worker has been registered successfully
  • In F12, show again the Debugger tab and the Service Workers node. We now have a SW running on our site.
  • In F12, click on "Inspect" the pwabuilder-sw.js file, new instance of the F12 tool will be created attached to the Service Worker
  • Navigate to the Console tab and click the clear button to clean the currently displayed logs
  • Refresh the site to now see the various assets being served by the SW's cache from the Console tab

3 - Publish to the store

4 - Windows API in a PWA

  • Navigate to https://preview.pwabuilder.com/ and click on the "Windows APIs" tab
  • Choose the "Toggle Compact Overlay mode" option and copy the code
  • Press F12 inside the installed side-loaded "SouthRidge" app
  • Paste the code into the F12 console tab to execute it
  • Launch a video inside the app to display the video player
  • Then copy the usage code from the site and paste it in the F12 console tab to show the application's window will be resized to compact mode thanks to that

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

insiderdevtour18-pwa's People

Contributors

boyofgreen avatar davrous avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

insiderdevtour18-pwa's Issues

Images disappeared from azurewebsites

When running the demo at southridge.azurewebsites.net all images called within frontpage.js are missing.
The url "srimages.azurewebsites.net" no longer exists...

Regards Martin Klein

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.