From 145bc73f8687d64697b24226f7d09d64cb4eb91b Mon Sep 17 00:00:00 2001 From: Alex Alonso Date: Tue, 21 Apr 2020 17:33:57 +0800 Subject: [PATCH] add typescript incremental build cache example Signed-off-by: Alex Alonso --- README.md | 1 + examples.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index a979c38..2f43c35 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ See [Examples](examples.md) for a list of `actions/cache` implementations for us - [Node - npm](./examples.md#node---npm) - [Node - Lerna](./examples.md#node---lerna) - [Node - Yarn](./examples.md#node---yarn) +- [Node - Typescript](./examples.md#node---typescript) - [OCaml/Reason - esy](./examples.md##ocamlreason---esy) - [PHP - Composer](./examples.md#php---composer) - [Python - pip](./examples.md#python---pip) diff --git a/examples.md b/examples.md index 5346ee2..82bbc73 100644 --- a/examples.md +++ b/examples.md @@ -198,6 +198,20 @@ The yarn cache directory will depend on your operating system and version of `ya ${{ 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 Esy allows you to export built dependencies and import pre-built dependencies. ```yaml