add a nix run '.#clean'
rule
This commit is contained in:
@@ -19,4 +19,6 @@ roughly:
|
|||||||
2. `tree-sitter generate`
|
2. `tree-sitter generate`
|
||||||
3. `tree-sitter test`
|
3. `tree-sitter test`
|
||||||
|
|
||||||
|
run `nix run '.#clean'` before committing to avoid checking in build artifacts.
|
||||||
|
|
||||||
the parser is defined in `grammar.js`, and tests live in `corpus/`.
|
the parser is defined in `grammar.js`, and tests live in `corpus/`.
|
||||||
|
@@ -16,5 +16,14 @@
|
|||||||
defaultPackage = packages.tree-sitter-nixshell;
|
defaultPackage = packages.tree-sitter-nixshell;
|
||||||
|
|
||||||
devShells.default = pkgs.callPackage ./shell.nix { };
|
devShells.default = pkgs.callPackage ./shell.nix { };
|
||||||
|
|
||||||
|
apps.clean = {
|
||||||
|
type = "app";
|
||||||
|
program = builtins.toString (pkgs.writeShellScript "clean" ''
|
||||||
|
# remove build artifacts
|
||||||
|
rm -f Cargo.toml binding.gyp
|
||||||
|
rm -rf bindings/ src/
|
||||||
|
'');
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user