Skip to content

Commit

Permalink
Update how-caching-works.md: .gitignore and .nxignore affect how file…
Browse files Browse the repository at this point in the history
…set caching works (#17831)
  • Loading branch information
jensbodal authored Jun 28, 2023
1 parent 2941ddc commit a55c27c
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/shared/concepts/how-caching-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,43 @@ dependencies. The test script will also consider the jest config file at the roo

For more information about modifying `inputs` and `namedInputs` for your own repo, read [Customizing Inputs](/more-concepts/customizing-inputs)

### Filesets

By default a value in `inputs` refers to either a `namedInput` or a `fileset`.

```json {% fileName="project.json"%}
{
"targets": {
"some-target": {
"inputs": ["{workspaceRoot}/cache-file-input"]
}
}
}
```

**is equivalent to**

```json {% fileName="project.json"%}
{
"targets": {
"some-target": {
"inputs": [{ "fileset": "{workspaceRoot}/cache-file-input" }]
}
}
}
```

<!-- prettier-ignore-start -->
{% callout type="note" title="Ignored Files" %}

By default any file that is ignored by either a `.gitignore` or `.nxignore` file will not be considered
as an input to the cache.

You could consider using a runtime hash input if a file ignored by one of these files is needed as an
input to the hash.
{% /callout %}
<!-- prettier-ignore-end -->

## Runtime Hash Inputs

Your targets can also depend on runtime values.
Expand Down

1 comment on commit a55c27c

@vercel
Copy link

@vercel vercel bot commented on a55c27c Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev

Please sign in to comment.