Skip to content

Commit

Permalink
Merge pull request #4 from Delni/feat/node
Browse files Browse the repository at this point in the history
Add node.js presets
  • Loading branch information
Delni authored Jan 5, 2023
2 parents f90bf3c + 9f17fb7 commit d900882
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ And each `Checkpoint` is defined as follow:
- [ ] Make it installable seamlessly
- [ ] Add flag-based descriptor for major use-cases. Go fileless
Currently supported Systems:
- Node
- Yarn
- Node Version Managers (nvm, n, volta)
- Missing some config ? Feel free to [open an issue](https://github.com/Delni/preflight/issues/new) to discuss it, and read [related docs](./presets/README.md)!

## How to contribute 📝
Expand Down
6 changes: 5 additions & 1 deletion presets/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ package presets
import "preflight/src/systemcheck"

// Please keep this map in alphabetical order
var Presets = map[string]systemcheck.SystemCheck{}
var Presets = map[string]systemcheck.SystemCheck{
"node": node,
"node-version": nodeVersion,
"yarn": yarn,
}
15 changes: 15 additions & 0 deletions presets/node.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package presets

import "preflight/src/systemcheck"

var node systemcheck.SystemCheck = systemcheck.SystemCheck{
Name: "Node",
Description: "",
Checkpoints: []systemcheck.Checkpoint{
{
Name: "node",
Command: "node",
Documentation: "See installation: https://nodejs.org/",
},
},
}
25 changes: 25 additions & 0 deletions presets/node_version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package presets

import "preflight/src/systemcheck"

var nodeVersion systemcheck.SystemCheck = systemcheck.SystemCheck{
Name: "Node Version Manager",
Description: "tools to be able to seamlessly change your current node/npm version",
Checkpoints: []systemcheck.Checkpoint{
{
Name: "nvm",
Command: "nvm",
Documentation: "See installation on github: https://github.com/nvm-sh/nvm#installing-and-updating",
},
{
Name: "n",
Command: "n",
Documentation: "See installation on github: https://github.com/tj/n#installation",
},
{
Name: "volta",
Command: "volta",
Documentation: "See https://volta.sh",
},
},
}
15 changes: 15 additions & 0 deletions presets/yarn.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package presets

import "preflight/src/systemcheck"

var yarn = systemcheck.SystemCheck{
Name: "Yarn",
Description: "Package Manager and tooling for managing your node projects",
Checkpoints: []systemcheck.Checkpoint{
{
Name: "yarn",
Command: "yarn",
Documentation: "See https://yarnpkg.com",
},
},
}

0 comments on commit d900882

Please sign in to comment.