Add res:format run target
This commit is contained in:
parent
b1f48e19fd
commit
a283801d72
|
@ -10,4 +10,4 @@ Monorepo managing all of my cloud and home lab resources.
|
|||
|
||||
=== Structure
|
||||
|
||||
This repository is small, and each Pulumi project is a 1-stack directory. Therefore, all Pulumi projects use the same name, while their stack names are chosen to be the parent directory name. The `+Pulumi.yaml+` file at repository's root is reused for every Pulumi projects inside.
|
||||
This repository is small, and each Pulumi project is a one-stack directory. Therefore, all Pulumi projects use the same project name, while their stack names are chosen to be the parent directory name. The `+Pulumi.yaml+` file at repository's root is reused for all Pulumi projects inside.
|
||||
|
|
9
nx.json
9
nx.json
|
@ -37,10 +37,17 @@
|
|||
"cwd": "{projectRoot}"
|
||||
}
|
||||
},
|
||||
"res:format": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"commands": ["rescript format -all"],
|
||||
"cwd": "{projectRoot}"
|
||||
}
|
||||
},
|
||||
"res:dev": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"commands": ["rescript -w"],
|
||||
"commands": ["rescript build -w"],
|
||||
"cwd": "{projectRoot}"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
"targets": {
|
||||
"res:build": {},
|
||||
"res:clean": {},
|
||||
"res:format": {},
|
||||
"res:dev": {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
},
|
||||
"res:build": {},
|
||||
"res:clean": {},
|
||||
"res:format": {},
|
||||
"res:dev": {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -4,9 +4,15 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
_: {
|
||||
{ pkgs, ... }: {
|
||||
projectRootFile = "flake.lock";
|
||||
|
||||
settings.formatter.rescript = {
|
||||
command = "${pkgs.nodePackages.pnpm}/bin/pnpm";
|
||||
options = [ "nx" "run-many" "-t" "res:format" ];
|
||||
includes = [ "*.res" ];
|
||||
};
|
||||
|
||||
# List of formatters: https://github.com/numtide/treefmt-nix/tree/main/programs
|
||||
programs =
|
||||
builtins.listToAttrs (
|
||||
|
|
Loading…
Reference in New Issue