Using FuckingNode: The fknode.yaml file¶
The fknode.yaml
file is used to configure extra settings for individual projects. It is completely opt-in and not required whatsoever. Some settings do however require specific config from here.
Below is a detailed explanation of each configuration option available in the file. They are all optional.
Get autocomplete for VSCode
While still work in progress, you can already download our Visual Studio Code extension for FuckingNode V3 here.
divineProtection¶
Divine protection is what we call ignorance. Basically, if you run a global cleanup with the --update
flag (so all projects get their dependencies updated) but don't want a specific project to get its dependencies updated, you'd add "updater"
to the divineProtection
option.
It can either be an array of feature-er
strings (updater
, linter
, etc...), or "*"
to ignore everything. "disabled"
is also valid and equals the default configuration.
- Type:
("updater" | "cleaner" | "linter" | "prettifier" | "destroyer")[] | "*" | "disabled"
- Example:
lintCmd¶
Specifies a script (from your package file > scripts {}
) to be used for linting when --lint
is passed to clean
, overriding the default (ESLint).
- Type:
string
- Example:
prettyCmd¶
Specifies a script (from your package file > scripts {}
) script to be used for prettifying when --pretty
is passed to clean
, overriding the default (Prettier).
- Type:
string
- Example:
destroy¶
Configuration for the destroyer, which removes specified targets when clean
is called with any of the intensities
, or an "*"
for enabling regardless of the intensity.
- Type:
- Example:
commitActions¶
If true, a commit will be made if an action that changes the code is performed and the Git workspace is clean. Learn more here.
- Type:
boolean
- Example:
commitMessage¶
Specifies the commit message to be used if a commit is made. If not provided, a default message is used.
- Type:
string
- Example:
updateCmdOverride¶
Overrides the default command for the updating dependencies with the provided runtime script command. Works the same way as lintCmd or prettyCmd, we simply made the name more verbose because in most cases you don't need (and should not) mess around with it.
- Type:
string
- Example:
flagless¶
Enables flagless features.
- Type:
flagless:
flaglessUpdate: boolean
flaglessDestroy: boolean
flaglessLint: boolean
flaglessPretty: boolean
flaglessCommit: boolean
- Example:
flagless:
flaglessUpdate: true
flaglessDestroy: false
flaglessLint: true
flaglessPretty: false
flaglessCommit: true
releaseCmd¶
Specifies a task to be executed upon running the release
command.
- Type:
string
- Example:
releaseAlwaysDry¶
If true, the release
command will always use dry-run
.
- Type:
boolean
- Example:
commitCmd¶
Specifies a task to be executed upon running the commit
command.
- Type:
string
- Example:
This is an example of a full fknode.yaml
file.
divineProtection: ["updater", "cleaner"]
lintCmd: "lint"
prettyCmd: "prettify"
destroy:
intensities: ["high"]
targets: ["dist", "build"]
commitActions: true
commitMessage: "Automated commit by fknode"
updateCmdOverride: "update"
flagless:
flaglessUpdate: true
flaglessDestroy: false
flaglessLint: true
flaglessPretty: false
flaglessCommit: true
releaseCmd: "release"
releaseAlwaysDry: true
commitCmd: "commit"