Skip to content

Commit

Permalink
Add nodenv
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonweiss committed Jan 30, 2019
1 parent cf0b2cb commit a0115b9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,14 @@ Aversion supports multiple languages and multiple version managers for each lang

### Ruby

* [rbenv][rbenv]
* [asdf][asdf]
* [rbenv][rbenv]

### Node

* [nvm][nvm]
* [asdf][asdf]
* [nodenv][nodenv]
* [nvm][nvm]

### Others

Expand Down Expand Up @@ -151,6 +152,7 @@ Bug reports and pull requests are welcome on GitHub at [https://github.com/brand

The package is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

[rbenv]: https://github.com/rbenv/rbenv
[nvm]: https://github.com/creationix/nvm
[asdf]: https://github.com/asdf-vm/asdf
[nodenv]: https://github.com/nodenv/nodenv
[nvm]: https://github.com/creationix/nvm
[rbenv]: https://github.com/rbenv/rbenv
27 changes: 27 additions & 0 deletions lib/version_managers/nodenv.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import VersionManager from "../version_manager"

export default class Nodenv extends VersionManager {
get languageKey() {
return "node"
}

get globalVersionCommand() {
return "nodenv global"
}

get installedVersionsCommand() {
return "nodenv versions --bare"
}

get isInstalledCommand() {
return "which nodenv"
}

get projectVersionFiles() {
return {
".node-version": (contents: string) => contents,
}
}
}

VersionManager.register(new Nodenv())

0 comments on commit a0115b9

Please sign in to comment.