mirror of
https://github.com/actions/setup-node.git
synced 2025-04-02 01:15:03 +08:00
Update documentation
This commit is contained in:
parent
7cfc90cf21
commit
9aee14b09c
|
@ -25,7 +25,7 @@ See [action.yml](action.yml)
|
|||
# Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node
|
||||
node-version: ''
|
||||
|
||||
# File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions.
|
||||
# File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions, .npmrc.
|
||||
# If node-version and node-version-file are both provided the action will use version from node-version.
|
||||
node-version-file: ''
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ Files located in data directory are used only for testing purposes.
|
|||
|
||||
|
||||
## Here the list of files in the data directory
|
||||
- `.nvmrc`, `.tools-versions` and `package.json` are used to test node-version-file logic
|
||||
- `.nvmrc`, `.tools-versions`, `package.json` and `.npmrc` are used to test node-version-file logic
|
||||
- `package-lock.json`, `pnpm-lock.yaml` and `yarn.lock` are used to test cache logic
|
||||
- `versions-manifest.json` is used for unit testing to check downloading Node.js versions from the node-versions repository.
|
||||
- `node-dist-index.json` is used for unit testing to check downloading Node.js versions from the official site. The file was constructed from https://nodejs.org/dist/index.json
|
||||
|
|
|
@ -8,7 +8,7 @@ inputs:
|
|||
node-version:
|
||||
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.'
|
||||
node-version-file:
|
||||
description: 'File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions.'
|
||||
description: 'File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions, .npmrc.'
|
||||
architecture:
|
||||
description: 'Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.'
|
||||
check-latest:
|
||||
|
|
|
@ -56,7 +56,7 @@ steps:
|
|||
|
||||
## Node version file
|
||||
|
||||
The `node-version-file` input accepts a path to a file containing the version of Node.js to be used by a project, for example `.nvmrc`, `.node-version`, `.tool-versions`, or `package.json`. If both the `node-version` and the `node-version-file` inputs are provided then the `node-version` input is used.
|
||||
The `node-version-file` input accepts a path to a file containing the version of Node.js to be used by a project, for example `.nvmrc`, `.node-version`, `.tool-versions`, `package.json`, or `.npmrc`. If both the `node-version` and the `node-version-file` inputs are provided then the `node-version` input is used.
|
||||
See [supported version syntax](https://github.com/actions/setup-node#supported-version-syntax).
|
||||
|
||||
> The action will search for the node version file relative to the repository root.
|
||||
|
|
Loading…
Reference in New Issue
Block a user