-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
basic documentation of outputDepcache usage
- Loading branch information
1 parent
3ff9554
commit 550210e
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,22 @@ We recommend using a separate source file from your output file to allow for sou | |
orchard -i ./sourceFile.html -o ./outputFile.html | ||
``` | ||
|
||
## Outputting depcache json format | ||
|
||
If you're building an application using systemjs import maps, and utilizing the [depcache](https://github.com/guybedford/import-maps-extensions#depcache) format, you can output the json file to be used by the `orchard` cli tool with the following command: | ||
|
||
```bash | ||
orchard -o depcache.json --outputDepcache true | ||
``` | ||
|
||
This outputs a json file that can be loaded by your solution, and that file will look something like: | ||
```json | ||
[ | ||
"https://unpkg.com/[email protected]/index.js", | ||
"https://cdn.jsdelivr.net/npm/[email protected]/es.js" | ||
] | ||
``` | ||
|
||
### Usage Implications | ||
|
||
In order to selectively serve modern code to modern browsers the script tags generated from the orchard utilize the `type="module"` attribute for es6+ builds, and es5 compatible code uses script tags with the `nomodule` and `defer` attributes. | ||
|