Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(GeneratorAPI): accept multiple arguments for the resolve method #4715

Merged
merged 3 commits into from
Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
docs: update descriptions of the resolve api [ci skip]
  • Loading branch information
haoqunjiang committed Nov 7, 2019
commit dff8356468ce0cb79b56b435d20306fd98260235
4 changes: 2 additions & 2 deletions docs/dev-guide/generator-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ The version string for the **project local** `@vue/cli-service` version that is
## resolve

- **Arguments**
- `{string} _path` - relative path from project root
- `{string} ..._paths` - A sequence of relative paths or path segments

- **Returns**
- `{string}`- the resolved absolute path
- `{string}`- the resolved absolute path, caculated based on the current project root

- **Usage**:
Resolve a path for the current project
Expand Down
4 changes: 2 additions & 2 deletions packages/@vue/cli/lib/GeneratorAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ class GeneratorAPI {
/**
* Resolve path for a project.
*
* @param {string} _path - Relative path from project root
* @return {string} The resolved absolute path.
* @param {string} _paths - A sequence of relative paths or path segments
* @return {string} The resolved absolute path, caculated based on the current project root.
*/
resolve (..._paths) {
return path.resolve(this.generator.context, ..._paths)
Expand Down