Skip to content

Add App Shell and Service Worker to --mobile flag #711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 12, 2016

Conversation

jeffbcross
Copy link
Contributor

Still needs handlebars support, probably some cleanup. Pairing with @hansl

@jeffbcross jeffbcross force-pushed the app-shell branch 2 times, most recently from e2da923 to 0c57317 Compare May 11, 2016 01:29
@jeffbcross
Copy link
Contributor Author

jeffbcross commented May 11, 2016

Remaining Todos:

  • Add Service Worker plugin to generate worker.js
  • Get rid of unnecessary _getVendorScripts() method in angular2-app
  • Split into multiple logical commits
  • Get rid of added dependencies in package.json

Commits:

  • Create mobile blueprint with icons and manifest
  • App Shell generation added to mobile blueprint and angular2-build.
  • Prod script concatenation and async script tag added to index.html (for mobile only)
  • Service Worker build step added

@jeffbcross jeffbcross force-pushed the app-shell branch 3 times, most recently from eaf5f38 to 6277b81 Compare May 12, 2016 00:57
@jeffbcross jeffbcross changed the title WIP App shell for @hansl Add App Shell and Service Worker to --mobile flag May 12, 2016
@@ -0,0 +1,35 @@
import {provide} from '@angular/core';
// import {ROUTER_PROVIDERS} from '@angular/router-deprecated';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to keep those comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll actually remove them for now since I still have to sort out the router upgrade.

For projects that use the --mobile flag, this will cause all
third-party polyfills and the system-loader script to be
concatenated into a single file that can be loaded via
an async script tag. This is necessary for App Shell to work
properly, so that rendering won't be blocked on synchronous
script loading.

Note: this change still loads app and library files individually.
Follow-up work should be done to further improve loading
performance.
The specs fail because they are trying to require angular-cli.json
which is not valid JSON anymore, since it has an expression,
<% isMobile %>, which is not inside a string.
@jeffbcross jeffbcross force-pushed the app-shell branch 2 times, most recently from 2a35ef9 to 1eebf56 Compare May 12, 2016 05:52
@jeffbcross jeffbcross merged commit 7c0ba39 into angular:master May 12, 2016
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants