Skip to content
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

feat: Generate an AppCache/ServiceWorker manifest during the build step. #215

Merged
merged 1 commit into from Feb 19, 2016

Conversation

alxhub
Copy link
Member

@alxhub alxhub commented Feb 17, 2016

This PR adds a build step to generate a manifest.appcache file from the full set of resources built for the application.

It includes a commented-out snippet in index.html to install a worker entitled /worker.js. This is because the worker must be disabled during development for the edit-save-refresh cycle to pick up changes, but should be enabled in production, and there is no good way to switch this at the moment.

The worker script itself is also not included - eventually project generation should conditionally install angular2-service-worker and use the worker script included in that. I will explore this option in a future PR.

@@ -6,6 +6,18 @@
<base href="/">
{{content-for 'head'}}
<link rel="icon" type="image/x-icon" href="favicon.ico">

<!-- Service worker support is disabled by default.
Install the worker script and uncomment to enable.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add some more detail about how to install the worker script?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done (in the README).

@alxhub alxhub force-pushed the sw-integration branch 3 times, most recently from ee72835 to 3590ff0 Compare February 18, 2016 22:49
@hansl
Copy link
Contributor

hansl commented Feb 18, 2016

LGTM. Good work. Not sure how long we'll keep this in the main repo but having the experience definitely helped shaping the build system.

…ep, from all of the resources in the output directory.
@alxhub alxhub merged commit 0228140 into angular:master Feb 19, 2016
clydin pushed a commit that referenced this pull request Jun 5, 2018
Some code already have been compiled to use tslib. The decorators should be stripped
for those as well.

Fixes #215
hansl added a commit that referenced this pull request Jun 6, 2018
Some code already have been compiled to use tslib. The decorators should be stripped
for those as well.

Fixes #215
@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.

None yet

4 participants