From 5ac49b4c44658fb4f586b35031658c09dfa812a9 Mon Sep 17 00:00:00 2001 From: Delni Date: Thu, 5 Jan 2023 11:56:52 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=E2=9C=A8=20Add=20node=20preset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presets/main.go | 4 +++- presets/node.go | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 presets/node.go diff --git a/presets/main.go b/presets/main.go index bf58671..40a0c21 100644 --- a/presets/main.go +++ b/presets/main.go @@ -3,4 +3,6 @@ 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, +} diff --git a/presets/node.go b/presets/node.go new file mode 100644 index 0000000..9cfce39 --- /dev/null +++ b/presets/node.go @@ -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/", + }, + }, +} From 599914808a925d4ce5a0e75ffd3b66d958294298 Mon Sep 17 00:00:00 2001 From: Delni Date: Thu, 5 Jan 2023 11:57:19 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=E2=9C=A8Add=20node=20versions=20managers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presets/main.go | 3 ++- presets/node_version.go | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 presets/node_version.go diff --git a/presets/main.go b/presets/main.go index 40a0c21..6629b28 100644 --- a/presets/main.go +++ b/presets/main.go @@ -4,5 +4,6 @@ import "preflight/src/systemcheck" // Please keep this map in alphabetical order var Presets = map[string]systemcheck.SystemCheck{ - "node": node, + "node": node, + "node-version": nodeVersion, } diff --git a/presets/node_version.go b/presets/node_version.go new file mode 100644 index 0000000..9feb412 --- /dev/null +++ b/presets/node_version.go @@ -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", + }, + }, +} From 0b0c9128b0f55e70205841986a41a203246e036b Mon Sep 17 00:00:00 2001 From: Delni Date: Thu, 5 Jan 2023 11:57:42 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=E2=9C=A8=20add=20yarn=20preset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presets/main.go | 1 + presets/yarn.go | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 presets/yarn.go diff --git a/presets/main.go b/presets/main.go index 6629b28..82b26f0 100644 --- a/presets/main.go +++ b/presets/main.go @@ -6,4 +6,5 @@ import "preflight/src/systemcheck" var Presets = map[string]systemcheck.SystemCheck{ "node": node, "node-version": nodeVersion, + "yarn": yarn, } diff --git a/presets/yarn.go b/presets/yarn.go new file mode 100644 index 0000000..301e3ec --- /dev/null +++ b/presets/yarn.go @@ -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", + }, + }, +} From 9f17fb78dfc275dc91a7346b0ec644257bc8b5ee Mon Sep 17 00:00:00 2001 From: Delni Date: Thu, 5 Jan 2023 11:58:31 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=93=9D=20Update=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 6a3ce5b..2df4ff1 100644 --- a/README.md +++ b/README.md @@ -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 📝