angular/adev/prerender/tutorials
2023-11-06 11:15:02 -08:00
..
tutorial-type docs: add angular.dev (#52536) 2023-11-06 11:15:02 -08:00
utils docs: add angular.dev (#52536) 2023-11-06 11:15:02 -08:00
generate-tutorials-routes.ts docs: add angular.dev (#52536) 2023-11-06 11:15:02 -08:00
generate-tutorials.ts docs: add angular.dev (#52536) 2023-11-06 11:15:02 -08:00
new-playground-template.ts docs: add angular.dev (#52536) 2023-11-06 11:15:02 -08:00
new-tutorial.ts docs: add angular.dev (#52536) 2023-11-06 11:15:02 -08:00
README.md docs: add angular.dev (#52536) 2023-11-06 11:15:02 -08:00
tutorials-config.ts docs: add angular.dev (#52536) 2023-11-06 11:15:02 -08:00
tutorials-types.ts docs: add angular.dev (#52536) 2023-11-06 11:15:02 -08:00
update-package-lock.ts docs: add angular.dev (#52536) 2023-11-06 11:15:02 -08:00

Tutorial Scripts

The tutorials scripts are responsible for generating the tutorials source code and metadata by reading the tutorials content from src/content/tutorials.

See the tutorials content README for more information about the tutorials content.

For each tutorial, the following JSON files are generated and stored at src/assets/tutorials:

  • source-code/<tutorial-pathname>.json: contains the tutorial source code in the WebContainer FileSystemTree format. It's used to mount the tutorial files in the WebContainer. See the WebContainer docs for more info: https://webcontainers.io/guides/working-with-the-file-system
  • metadata/<tutorial-pathname>.json: the tutorial metadata has all the information necessary to manage the tutorial in app. It contains the tutorial config.json, the previous and next step, the next tutorial, and the code editor file paths and contents.
  • routes.json: defines all routes for the tutorials, used at src/app/sub-navigation-data.ts to populate the tutorials nav.

Usage

yarn generate-tutorials