Skip to content

Commit 70a760e

Browse files
committed
Update the docs
1 parent 2375cb6 commit 70a760e

5 files changed

Lines changed: 108 additions & 71 deletions

File tree

docs/learn/audit.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ FuckingNode audit should not be allowed to have the final say over whether break
119119
## Availability
120120

121121
Where `EXP` indicates only experimental support, and `YES` and `NO` indicate the obvious.
122+
This table is only updated when compatibility changes, don't mind the version number being "outdated".
122123

123124
| Support | NodeJS npm | NodeJS pnpm | NodeJS yarn | Deno | Bun | Go | Cargo |
124125
| :--------- | ---------- | ----------- | ----------- | ---- | --- | -- | ----- |

docs/learn/clean.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ We basically run the CLI commands you'd run by yourself recursively across all o
128128
## Availability
129129

130130
Where `PARTIAL` indicates partial / incomplete support, and `YES` and `NO` indicate the obvious.
131+
This table is only updated when compatibility changes, don't mind the version number being "outdated".
131132

132133
| Support | NodeJS npm | NodeJS pnpm | NodeJS yarn | Deno | Bun | Go | Cargo |
133134
| :--------- | ---------- | ----------- | ----------- | ------- | ------- | ------- | ------- |

docs/learn/cross-runtime-support.md

Lines changed: 49 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,65 @@
22

33
> `fuckingnode compat [item]`
44
5-
!!! note "What we mean by _Cross-runtime_"
6-
While we always use the term "cross-runtime", we also include _cross-platform_ (Golang and Rust) support inside of that term.
7-
8-
While FuckingNode can be a very powerful automation tool if properly used, in the end it's just an executable that _automates_ tasks; it doesn't do much on its own. Thus, **features that aren't supported by a runtime itself, won't work with us**. (Adding "polyfills" or "glue fixes" is not discarded as an idea, but not planned short-term anyway).
9-
10-
You can run `compat` anytime from the CLI to see a table showing what works and what doesn't. **NodeJS is the only environment with 100% platform support.** As of version 4.0.0, that table looks like this:
11-
12-
| Feature | NodeJS | Deno | Bun | Go | Cargo |
13-
|------------|--------|----------|----------|----------|----------|
14-
| Cleanup | Yes | Partial | Partial | Partial | Partial |
15-
| Kickstart | Yes | Yes | Yes | Yes | Yes |
16-
| Commit | Yes | Yes | Yes | Partial | Partial |
17-
| Release | npm | jsr | npm | No | Yes |
18-
| Stats | Yes | Yes | Yes | Partial | Yes |
19-
| Surrender | Yes | Yes | Yes | Yes | Yes |
20-
| Setup | Yes | Yes | Yes | Yes | Yes |
21-
| Audit | Yes | No | Yes | No | No |
22-
| Launch | Yes | Yes | Yes | Yes | Yes |
5+
!!! note "What we mean by _Cross-runtime_" While we always use the term
6+
"cross-runtime", we also include _cross-platform_ (Golang and Rust) support
7+
inside of that term.
8+
9+
While FuckingNode can be a very powerful automation tool if properly used, in
10+
the end it's just an executable that _automates_ tasks; it doesn't do much on
11+
its own. Thus, **features that aren't supported by a runtime itself, won't work
12+
with us**. (Adding "polyfills" or "glue fixes" is not discarded as an idea, but
13+
not planned short-term anyway).
14+
15+
You can run `compat` anytime from the CLI to see a table showing what works and
16+
what doesn't. **NodeJS is the only environment with 100% platform support.** As
17+
of version 5.1.0, that table looks like this:
18+
19+
| Feature | NodeJS | Deno | Bun | Go | Cargo |
20+
| --------- | ---------- | ---------- | ---------- | ---------- | ---------- |
21+
| Cleanup | Yes | Partial | Partial | Partial | Partial |
22+
| Kickstart | Yes | Yes | Yes | Yes | Yes |
23+
| Commit | (Agnostic) | (Agnostic) | (Agnostic) | (Agnostic) | (Agnostic) |
24+
| Uncommit | (Agnostic) | (Agnostic) | (Agnostic) | (Agnostic) | (Agnostic) |
25+
| Release | Yes | Yes | Yes | No | Yes |
26+
| Stats | Yes | Yes | Yes | Partial | Yes |
27+
| Surrender | Yes | Yes | Yes | Yes | Yes |
28+
| Setup | (Agnostic) | (Agnostic) | (Agnostic) | (Agnostic) | (Agnostic) |
29+
| Audit | Yes | No | Yes | No | No |
30+
| Launch | (Agnostic) | (Agnostic) | (Agnostic) | (Agnostic) | (Agnostic) |
31+
| Terminate | Partial | Partial | Partial | Yes | Yes |
32+
33+
'Yes', 'No', 'Partial' indicate the obvious. '(Agnostic)' indicates that the
34+
feature runs anywhere (it won't check if you're on a supported runtime or depend
35+
on any runtime-specific feature).
36+
37+
---
2338

2439
Reasons for not supporting a feature are the following.
2540

2641
## Partial Deno, Bun, Cargo & Go support for cleanup
2742

28-
In all these runtimes, the kind of cleanup commands we'd use (`prune`, `dedupe`...) aren't available, so the _cleanup itself_ isn't available.
43+
In all these runtimes, the kind of cleanup commands we'd use (`prune`,
44+
`dedupe`...) aren't available, so the _cleanup itself_ isn't available.
2945

30-
`clean` will still work with them, as linting, prettification, or updates do work.
46+
`clean` will still work with them, as linting, prettification, or updates do
47+
work.
3148

3249
## No Deno support for hard cleanup
3350

34-
FuckingNode itself is written in Deno, thus we're disallowed by the runtime from cleaning its cache. While a "gluefix" exists, it doesn't work most of the time.
51+
FuckingNode itself is written in Deno, thus we're disallowed by the runtime from
52+
cleaning its cache. While a "gluefix" exists, it doesn't work most of the time.
3553

3654
## No Golang support for release
3755

38-
We might add it in the future, for now it's not supported because it're harder to implement (as more steps are required).
39-
40-
## Partial Cargo & Go support for commit
41-
42-
`commitCmd` is not supported by these platforms. This is because Cargo and Go don't have "JS-like `run`" tasks.
56+
We might add it in the future, for now it's not supported because it're harder
57+
to implement (as more steps are required).
4358

4459
## Partial Go support for stats
4560

46-
Golang _do_ support it but doesn't support the Recommended Community Standards part. `go.mod` doesn't have any field that can be compared to anything. No module name, no author, no license, etc...
61+
Golang _does_ support it but doesn't support the Recommended Community Standards
62+
part. `go.mod` doesn't have any field that can be compared to anything. No
63+
module name, no author, no license, etc...
4764

4865
## No Cargo & Go support for migrate
4966

@@ -52,3 +69,8 @@ There's a single package manager for these platforms, `migrate` is useless.
5269
## No audit support for Deno, Cargo, or Go
5370

5471
Neither Deno, nor Golang, nor Cargo, offer an `audit` command.
72+
73+
## Partial terminate support for JS runtimes
74+
75+
Some steps like PATH removal or deeper uninstall (specifically for Node) are yet
76+
to be done.

docs/learn/errors.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,15 @@ Usually happens with kickstart. You provided a path that is _not_ empty, but _ha
7070

7171
Errors related to configuration.
7272

73+
### Invalid favorite IDE
74+
75+
`Cfg__User__FavIDE`
76+
77+
If you manually set your favorite IDE to an invalid value this error happens.
78+
7379
### Invalid CmdKey
7480

75-
`Cfg__InvalidCmdK`
81+
`Cfg__FknYaml__InvalidCmdK`
7682

7783
[Cmds](../manual/fknode-yaml.md#cmdsets) require to start with a key character, either `~`, `$`, `=`, or `<`. If the first character of a Cmd is not any of those, this error throws.
7884

@@ -140,6 +146,12 @@ Differentiating between npm, pnpm, Yarn, Bun, Deno, Rust, or Go projects, or no
140146

141147
_The name's a bit of a joke, but_ this error happens when the same project has two or more lockfiles. Lockfiles are our main tool to determine the "state" (env) of your project; your project is not Schrödinger's cat and shouldn't be in several states at the same time.
142148

149+
### Env not found
150+
151+
`Env__NotFound`
152+
153+
If a project from your list isn't found (in the sense of the filepath not being found), this error may happen.
154+
143155
## Task [Task]
144156

145157
All errors in this category are `Task__[TASK TYPE]`, which can be `Release`, `Commit`, `Launch`, `Update`, `Lint`, `Pretty`, or `Build`. Any unexpected error when running any of these tasks for any project will trigger a Task category error.
@@ -179,20 +191,8 @@ More casual way to call a "NotImplemented" error. If we're lazy to finish a feat
179191

180192
Errors that depend on something external.
181193

182-
### Publish
183-
184-
`External__Publish`
185-
186-
When doing a release, if your package manager's publish command fails, this error code appears.
187-
188194
### Setting / Favorite IDE
189195

190196
`External__Setting__FavIde`
191197

192198
If you changed your favorite IDE to something unsupported, then got us to attempt to launch it, this happens. You cannot directly set this setting to something invalid, you'd have to manually edit the config file - making this an "external" error.
193-
194-
### Project / Not found
195-
196-
`External__Proj__NotFound`
197-
198-
If a project from your list isn't found (in the sense of the filepath not being found), this error happens. You cannot add a project that doesn't exist unless modifying the config file; or adding one that does exist, then moving the directory - making this an "external" error too.

docs/manual/index.md

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,54 @@ description: "A complete guide for your complete dev-life-quality improver."
55

66
# FuckingNode user manual
77

8-
Everything, from the basic to the complex, is documented here step by step.
8+
Everything, from the basic to the complex, is documented here step by step. **Use the sidebar to navigate everything page by page and learn everything in detail.**
99

10-
## Outline
10+
You can also just keep reading this page for a TL;DR.
1111

12-
These are links to individual pages. For the full manual, click the first one, then keep reading. For a faster, one page guide to quickly get started, [skip here](#tldr-for-getting-started-as-soon-as-possible).
12+
## TL;DR for getting started as soon as possible
1313

14-
- [Install the CLI](install.md)
15-
- [Configuration](configuration.md)
16-
- [Main usage guide](usage.md)
17-
- [Individual project config (fknode.yaml)](fknode-yaml.md)
18-
- [Feature - Kickstart](kickstart.md)
19-
- [Feature - Commit](commit.md)
20-
- [Feature - Build](build.md)
21-
- [Feature - Release](release.md)
22-
- [Feature - Launch](launch.md)
23-
- [Feature - Migrate](migrate.md)
24-
- [Feature - Setup](setup.md)
25-
- [Feature - Stats](stats.md)
26-
- [Feature - Surrender](surrender.md)
27-
- [Feature - Audit](audit.md)
28-
- [What's next?](whats-next.md)
14+
### Step 0: Install
2915

30-
For further learning:
16+
### :fontawesome-brands-windows: Microsoft Windows
3117

32-
- [Cross-runtime support](../learn/cross-runtime-support.md)
18+
Copy and paste the following code in a terminal session.
3319

34-
## TL;DR for getting started as soon as possible
20+
```powershell
21+
powershell -c "irm fuckingnode.github.io/install.ps1 | iex"
22+
```
23+
24+
### :simple-linux: Linux and :simple-apple: macOS
25+
26+
Copy and paste the following code in a terminal session.
27+
28+
```bash
29+
curl -fsSL fuckingnode.github.io/install.sh | bash
30+
```
31+
32+
### :simple-nixos: Nix / NixOS
3533

36-
### Step 0
34+
!!! warning
35+
ARM (`aarch64-linux`) support is available, but NOT tested!
3736

38-
Install it for your platform following [the instructions here](./install.md) (just like any professional tool, installation is as easy as running one CLI command).
37+
Add the repo to your `flake.nix`.
38+
39+
```nix
40+
inputs = {
41+
...
42+
fuckingnode.url = "github:FuckingNode/FuckingNode";
43+
...
44+
};
45+
```
46+
47+
Then, add this to your system packages:
48+
49+
```nix
50+
inputs.fuckingnode.packages."${pkgs.system}".default;
51+
```
3952

40-
### Step 1
53+
### Step 1: Initial setup
4154

42-
Add your projects to FuckingNode's project list. This is done manually with the `fuckingnode add <path>` (or `fkadd <path>`) command. `<path>` can be any file path, or `.` to use the CWD.
55+
Add your projects to FuckingNode's project list. This is done manually with the `fuckingnode add <path>` (or `fkadd <path>`) command. `<path>` can be any file path, or empty to use the CWD.
4356

4457
```bash
4558
# relative
@@ -48,12 +61,12 @@ fuckingnode add "../projects/project1"
4861
fuckingnode add "/home/Zaka/Code/project2"
4962
# self path
5063
cd project3
51-
fuckingnode add .
64+
fuckingnode add
5265
```
5366

5467
It's recommended that from now on you run `fkadd .` immediately after running `npm init` (or `pnpm init` or whatever) each time you create a project.
5568

56-
### Step 2
69+
### Step 2: Start using it
5770

5871
A basic cleanup is invoked by running this command, with no arguments.
5972

@@ -78,7 +91,7 @@ fuckingnode clean ../project1
7891
fuckingnode clean my-framework
7992
```
8093

81-
### Step 3
94+
### Step 3: Use it better
8295

8396
For increased intensity, use this.
8497

@@ -90,7 +103,7 @@ When cleaning like this, global caches from all your installed package managers
90103

91104
If you only wish to clear global caches without waiting for individual cleanup of all of your projects, use `fuckingnode clean hard-only`, or a shortcut (`fuckingnode global-clean` or `fuckingnode hard-clean`).
92105

93-
### Step 4
106+
### Step 4: Use it even better
94107

95108
For the best experience, you can pass flags to the clean command for using additional features. Detailed explanations are available at the [usage manual](../manual/usage.md), but basically:
96109

@@ -102,7 +115,7 @@ For the best experience, you can pass flags to the clean command for using addit
102115

103116
Each flag can be invoked with its 1st letter for faster typing (`-l` = `--lint`, `-p` = `--pretty`...).
104117

105-
As outlined [before](#step-2) cleaning is global. When running with `--lint` all your projects will be automatically linted (unless overridden via an [`fknode.yaml` file](fknode-yaml.md)), greatly increasing your productivity.
118+
As outlined [before](#step-2-start-using-it) cleaning is global. When running with `--lint` all your projects will be automatically linted (unless overridden via an [`fknode.yaml` file](fknode-yaml.md)), greatly increasing your productivity.
106119

107120
Behavior itself can also be overridden via an `fknode.yaml` file, in case you'd like to use a different linter than ESLint, or a different prettifier than Prettier.
108121

@@ -113,7 +126,7 @@ Note `--destroy` and `--commit` _are_ affected by the global cleaning rule, howe
113126

114127
---
115128

116-
That's the basic manual. For further learning about `fknode.yaml` or advanced features, [refer to the desired manual section](#outline).
129+
And that's the basic manual. For further learning about `fknode.yaml` or advanced features, keep navigating the documentation. You've got it all in the sidebar.
117130

118131
---
119132

0 commit comments

Comments
 (0)