Skip to content

Commit 3000058

Browse files
committed
feat: auto install node version when running nodenv which
0 parents  commit 3000058

File tree

7 files changed

+74
-0
lines changed

7 files changed

+74
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- 'v?[0-9]+.[0-9]+.[0-9]+'
6+
7+
jobs:
8+
github:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: jasonkarns/create-release@master
12+
13+
homebrew:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: mislav/bump-homebrew-formula-action@v1
17+
with:
18+
formula-name: nodenv-auto-install
19+
homebrew-tap: manlao/homebrew-tap
20+
env:
21+
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}

.gitignore

Whitespace-only changes.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Sean Tu
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# nodenv-auto-install
2+
3+
Auto install node version
4+
5+
## Installation
6+
7+
### Installing with Git
8+
9+
```shell
10+
git clone https://github.com/manlao/nodenv-auto-install.git $(nodenv root)/plugins/nodenv-auto-install
11+
```
12+
13+
### Installing with homebrew
14+
15+
```shell
16+
brew install manlao/tap/nodenv-auto-install
17+
```

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.0
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
if [ "$NODENV_VERSION" != "system" ] && [ ! -d "$NODENV_ROOT/versions/$NODENV_VERSION" ]; then
4+
nodenv install "$NODENV_VERSION"
5+
fi

0 commit comments

Comments
 (0)