create-nvmrc
Version:
A GitHub action that commits an .nvmrc file to your repository that can also be used as an npm module or cli.
76 lines (53 loc) ⢠2.65 kB
Markdown
<h1 align="center">Welcome to create-nvmrc š</h1>
<p>
<img alt="Version" src="https://img.shields.io/badge/version-0.0.0-blue.svg?cacheSeconds=2592000" />
<a href="https://init-actions.github.io/nvmrc" target="_blank">
<img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
</a>
<a href="https://github.com/init-actions/nvmrc/graphs/commit-activity" target="_blank">
<img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" />
</a>
<a href="https://github.com/init-actions/nvmrc/blob/master/LICENSE" target="_blank">
<img alt="License: MIT" src="https://img.shields.io/github/license/init-actions/nvmrc" />
</a>
</p>
> A GitHub action that commits an .nvmrc file to your repository that can also be used as an npm module or cli.
### š [Homepage](https://github.com/init-actions/nvmrc#readme)
## Install
```sh
npm install create-nvmrc
```
## Usage
```typescript
import { createNvmrcFile } from "create-nvmrc";
createNvmrcFile("/path/to/.nvmrc", "v12.16.3", true)
.then(() => console.log("created"))
.catch(err => console.log("failed", err));
createNvmrcFile("/path/to/.nvmrc", "12.16.3", true)
.then(() => console.log("created"))
.catch(err => console.log("failed", err));
createNvmrcFile("/path/to/.nvmrc", "lts", true)
.then(() => console.log("created"))
.catch(err => console.log("failed", err));
createNvmrcFile("/path/to/.nvmrc", "current", true)
.then(() => console.log("created"))
.catch(err => console.log("failed", err));
```
## Run tests
```sh
npm run test
```
## Author
š¤ **Rik Hoffbauer <62353999+rikhoffbauer@users.noreply.github.com> (rikhoffbauer.github.io)**
- Website: https://rikhoffbauer.github.io
- Github: [@rikhoffbauer](https://github.com/rikhoffbauer)
- LinkedIn: [@rikhoffbauer](https://linkedin.com/in/rikhoffbauer)
## š¤ Contributing
Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/init-actions/nvmrc/issues). You can also take a look at the [contributing guide](https://github.com/init-actions/nvmrc/blob/master/CONTRIBUTING.md).
## Show your support
Give a āļø if this project helped you!
<a href="https://www.patreon.com/rikhoffbauer">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
</a>
## š License
Copyright Ā© 2020 [Rik Hoffbauer <62353999+rikhoffbauer@users.noreply.github.com> (rikhoffbauer.github.io)](https://github.com/rikhoffbauer).<br /> This project is [MIT](https://github.com/init-actions/nvmrc/blob/master/LICENSE) licensed.