-
Notifications
You must be signed in to change notification settings - Fork 7
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: update documentation #1040
Conversation
4c1d57a
to
e2eba1e
Compare
README.md
Outdated
|
||
- `crossorigin` Flag that sets crossorigin attribute on links. If true it will be set for all prefetched resources. | ||
1. By running the install command above, the following lines should have been added to the application's `angular.json`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. By running the install command above, the following lines should have been added to the application's `angular.json`: | |
1. By running the `ng add` command above, the following lines should have been added to the application's `angular.json`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a link from the main readme to this doc?
docs/HOW_IT_WORKS.md
Outdated
|
||
After adding a service worker to your project, as specified in the [prerequisites](README.md#prerequisites), the modifications include | ||
the creation of a service worker configuration file called `ngsw-config.json`, which specifies the caching behaviors. | ||
Then the build process creates the manifest file `ngsw.json` using information from `ngsw-configuration.json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ngsw-configuration.json -> ngsw-config.json
we should mention that ngsw.json is in the dist folder
e2eba1e
to
9d3192e
Compare
e708a94
to
cb0eaed
Compare
README.md
Outdated
## Builder options | ||
- `targetBuild` **Mandatory** The target build where prefetch should be applied. Used for identifying the `outputPath` of the build. | ||
|
||
- `resourceTypes` An object describing the resource types that should be prefetched. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any constraints related to the key of said object? For instance would "img": ["png"] still be valid?
Does it follow a schema?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cb0eaed
to
f794701
Compare
README.md
Outdated
@@ -19,46 +19,78 @@ In some cases, it is possible to prefetch the static resources of an application | |||
The prefetch builder generates a `ngxPrefetch.js` file that should be included in the HTML page of the entry point. When run, it dynamically [creates `<link>` tags](https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ) for each static resource (such as JS and CSS files) so that the browser can prefetch them during idle times. This will improve the Page Load Time of the application when it is actually loaded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could give a bit more explanation here: "This will improve the Page Load Time of the application when it is actually loaded" => This will improve the Page Load Time of the application when the application it accessed for the first time. Then the browser caching will take over, until a new version of the application is deployed or the browser application cache is cleared.
f794701
to
06ce5c3
Compare
docs/HOW_IT_WORKS.md
Outdated
- `{DYNAMIC_CONTENT_PATH}`: the path where the dynamic resources are hosted (`"mydynamiccontentpath"` for example) | ||
- `{DYNAMIC_CONTENT_FILES}`: the path of the dynamic content files relative to the dynamic content path (expects a format like the following example: `["relativePath/myfile1", "relativePath/myfile2"]`) | ||
|
||
### HTLM header |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LINK elements in header
README.md
Outdated
@@ -89,6 +89,8 @@ Please refer to the details on how the ngx-prefetch works [here](docs/HOW_IT_WOR | |||
If this is not the case, you can configure the full path of the resources that will be prefetched (ex: https://my-web-app.com/path/to/my-app/). | |||
It is also possible to set this value at runtime. Instead of setting it in the Builder's options, you can search for `{STATICS_FULL_PATH}` and replace it on the server side in order to inject a path. | |||
|
|||
- `localizationPattern` Pattern for the relative path of the localization file. By default, the pattern corresponds to the JSON file in a folder called localizations: `"/localizations/${language}.json"`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should mention that if path contains the ${language} part, it will be replaced on the server side.
28dad98
to
bd21aa5
Compare
bd21aa5
to
9800245
Compare
No description provided.