Skip to content

Commit

Permalink
Add version getter
Browse files Browse the repository at this point in the history
  • Loading branch information
taylortom committed Aug 7, 2023
1 parent e92ec12 commit a24f2c8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ class API {
// restore plugins
await this.installPlugins({ plugins, cwd, logger })
}

/**
* @param {Object} options
* @param {string} [options.cwd=process.cwd()] Directory to install into
* @returns {string}
*/
getCurrentFrameworkVersion ({
cwd = process.cwd(),
} = {}) {
return new Project({ cwd }).version
}

/**
* @param {Object} options
Expand Down

0 comments on commit a24f2c8

Please sign in to comment.