We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06762dd commit 08b29a7Copy full SHA for 08b29a7
.githooks/pre-push.sh
@@ -0,0 +1,4 @@
1
+#!/bin/bash
2
+
3
+cargo fmt --all
4
+leptosfmt .
build.rs
@@ -3,12 +3,17 @@ use std::{
fs,
fs::{DirEntry, Metadata},
5
io::Write,
6
- path::PathBuf,
+ path::{Path, PathBuf},
7
};
8
9
fn main() {
10
println!("cargo:rerun-if-changed=extras");
11
12
+ // install pre-push hook
13
+ if !Path::new(".git/hooks/pre-push").exists() {
14
+ fs::hard_link(".githooks/pre-push.sh", ".git/hooks/pre-push").unwrap();
15
+ }
16
17
let folders = fs::read_dir("extras").unwrap();
18
if let Err(e) = fs::create_dir("src/extras") {
19
if e.kind() != std::io::ErrorKind::AlreadyExists {
0 commit comments