"Fossies" - the Fresh Open Source Software Archive

Member "angular-16.2.7/aio/README.md" (27 Sep 2023, 7298 Bytes) of package /linux/www/angular-16.2.7.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.


Angular documentation project (https://angular.io)

Everything in this folder is part of the documentation project. This includes:

Developer tasks

We use Yarn to manage the dependencies and development tasks. Behind the scenes, Bazel is used to build targets and run tests. You should run all these tasks from the angular/aio folder. Here are the most important tasks you might need to use:

Note for Windows users

The underlying Bazel build requires creating symbolic links (see here for details). On Windows, this requires to either have Developer Mode enabled (supported on Windows 10 or newer) or run the setup commands as administrator.

Using ServiceWorker locally

Running yarn start (even when explicitly targeting production mode) does not set up the ServiceWorker. If you want to test the ServiceWorker locally, you can use yarn build and then serve the files with yarn http-server ../dist/bin/aio/build -p 4200.

Guide to authoring

There are two types of content in the documentation:

We use the dgeni tool to convert these files into docs that can be viewed in the doc-viewer.

The Authors Style Guide prescribes guidelines for writing guide pages, explains how to use the documentation classes and components, and how to markup sample source code to produce code snippets.

Generating the complete docs

Running the yarn build or yarn start tasks will automatically generate the docs. This will process all the source files (API and other), extracting the documentation and generating JSON files that can be consumed by the doc-viewer.

Partial doc generation for editors

Full doc generation can take up to one minute. That's too slow for efficient document creation and editing.

You can make small changes in a smart editor that displays formatted markdown:

In VS Code, Cmd-K, V opens markdown preview in side pane; Cmd-B toggles left sidebar

You also want to see those changes displayed properly in the doc viewer with a quick, edit/view cycle time.

For this purpose, use the yarn docs-watch task, which watches for changes to source files and only re-processes the files necessary to generate the docs that are related to the file that has changed. Since this task takes shortcuts, it is much faster (often less than 1 second) but it won't produce full fidelity content. For example, links to other docs and code examples may not render correctly. This is most particularly noticed in links to other docs and in the embedded examples, which may not always render correctly.

The general setup is as follows:

yarn docs-watch