add a `nix run '.#clean'` rule
This commit is contained in:
parent
c9d79b0734
commit
e3736f7f1b
|
@ -19,4 +19,6 @@ roughly:
|
|||
2. `tree-sitter generate`
|
||||
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/`.
|
||||
|
|
|
@ -16,5 +16,14 @@
|
|||
defaultPackage = packages.tree-sitter-nixshell;
|
||||
|
||||
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/
|
||||
'');
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue