You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow #20
I found that the version printed by vite+ is also incorrect. I'm
thinking that adding a `working-directory` might be better, which could
also simplify the configuration.
It looks like the `working-directory` from the GitHub action does not
work with `uses`. https://github.com/orgs/community/discussions/25742
Feel free to close this PR if you do not want to introduce another "cwd"
input.
| `version` | Version of Vite+ to install | No | `latest` |
136
+
| `node-version` | Node.js version to install via `vp env use` | No | Latest LTS |
137
+
| `node-version-file` | Path to file containing Node.js version (`.nvmrc`, `.node-version`, `.tool-versions`, `package.json`) | No | |
138
+
| `working-directory` | Project directory used for relative paths, lockfile auto-detection, environment checks, and default install | No | Workspace root |
139
+
| `run-install` | Run `vp install` after setup. Accepts boolean or YAML object with `cwd`/`args` | No | `true` |
140
+
| `cache` | Enable caching of project dependencies | No | `false` |
141
+
| `cache-dependency-path` | Path to lock file for cache key generation | No | Auto-detected |
142
+
| `registry-url` | Optional registry to set up for auth. Sets the registry in `.npmrc` and reads auth from `NODE_AUTH_TOKEN` | No | |
143
+
| `scope` | Optional scope for scoped registries. Falls back to repo owner for GitHub Packages | No | |
144
+
145
+
When `working-directory` is set, relative `run-install.cwd`, `node-version-file`, and `cache-dependency-path` values are resolved from that directory.
130
146
131
147
## Outputs
132
148
@@ -149,6 +165,8 @@ When `cache: true` is set, the action additionally caches project dependencies b
149
165
150
166
The dependency cache key format is: `vite-plus-{OS}-{arch}-{pm}-{lockfile-hash}`
151
167
168
+
When `working-directory` is set, lockfile auto-detection runs in that directory.
169
+
152
170
When `cache-dependency-path` points to a lock file in a subdirectory, the action resolves the package-manager cache directory from that lock file's directory.
Copy file name to clipboardExpand all lines: action.yml
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,9 @@ inputs:
20
20
node-version-file:
21
21
description: "Path to file containing the Node.js version spec (.nvmrc, .node-version, .tool-versions, package.json). Ignored when node-version is specified."
22
22
required: false
23
+
working-directory:
24
+
description: "Project directory to use for relative paths, lockfile auto-detection, environment checks, and default `vp install` execution."
25
+
required: false
23
26
cache:
24
27
description: "Enable caching of project dependencies"
0 commit comments