add typescript incremental build cache example

Signed-off-by: Alex Alonso <alex4551@gmail.com>
This commit is contained in:
Alex Alonso 2020-04-21 17:33:57 +08:00
parent f00dedfa6c
commit 145bc73f86
No known key found for this signature in database
GPG Key ID: B06E718B4A8A3200
2 changed files with 15 additions and 0 deletions

View File

@ -69,6 +69,7 @@ See [Examples](examples.md) for a list of `actions/cache` implementations for us
- [Node - npm](./examples.md#node---npm) - [Node - npm](./examples.md#node---npm)
- [Node - Lerna](./examples.md#node---lerna) - [Node - Lerna](./examples.md#node---lerna)
- [Node - Yarn](./examples.md#node---yarn) - [Node - Yarn](./examples.md#node---yarn)
- [Node - Typescript](./examples.md#node---typescript)
- [OCaml/Reason - esy](./examples.md##ocamlreason---esy) - [OCaml/Reason - esy](./examples.md##ocamlreason---esy)
- [PHP - Composer](./examples.md#php---composer) - [PHP - Composer](./examples.md#php---composer)
- [Python - pip](./examples.md#python---pip) - [Python - pip](./examples.md#python---pip)

View File

@ -198,6 +198,20 @@ The yarn cache directory will depend on your operating system and version of `ya
${{ runner.os }}-yarn- ${{ runner.os }}-yarn-
``` ```
## Node - Typescript
Enable typescript incremantal build by passing flag `--incremental` and location of incremental build info is controlled by flag `--tsBuildInfoFile`
More info in https://www.typescriptlang.org/docs/handbook/compiler-options.html
```yaml
- uses: actions/cache@v1
id: tsbuild-cache
with:
path: buildcache.tsbuildinfo #the file you mention when build the project by passing parameter tsBuildInfoFile
key: ${{ runner.os }}-tsbuild
restore-keys: |
${{ runner.os }}-tsbuild
```
## OCaml/Reason - esy ## OCaml/Reason - esy
Esy allows you to export built dependencies and import pre-built dependencies. Esy allows you to export built dependencies and import pre-built dependencies.
```yaml ```yaml