@@ -5,34 +5,34 @@ use nix_rs::{flake::url::FlakeUrl, info::NixInfo};
55use omnix_common:: markdown:: print_markdown;
66use omnix_health:: { check:: caches:: CachixCache , traits:: Checkable , NixHealth } ;
77
8- use crate :: config:: HackConfig ;
8+ use crate :: config:: DevelopConfig ;
99
10- /// A project that an be hacked on locally.
10+ /// A project that an be developed on locally.
1111pub struct Project {
1212 /// The directory of the project.
1313 pub dir : PathBuf ,
1414 /// [FlakeUrl] corresponding to the project.
1515 pub flake : FlakeUrl ,
16- /// The hack configuration
17- pub cfg : HackConfig ,
16+ /// The develop configuration
17+ pub cfg : DevelopConfig ,
1818}
1919
2020impl Project {
2121 pub async fn new ( dir : & Path ) -> anyhow:: Result < Self > {
2222 let dir = dir. canonicalize ( ) ?;
2323 let flake: FlakeUrl = Into :: < FlakeUrl > :: into ( dir. as_ref ( ) ) ;
24- let cfg = HackConfig :: from_flake ( & flake) . await ?;
24+ let cfg = DevelopConfig :: from_flake ( & flake) . await ?;
2525 Ok ( Self { dir, flake, cfg } )
2626 }
2727}
2828
29- pub async fn hack_on ( prj : & Project ) -> anyhow:: Result < ( ) > {
30- hack_on_pre_shell ( prj) . await ?;
31- hack_on_post_shell ( prj) . await ?;
29+ pub async fn develop_on ( prj : & Project ) -> anyhow:: Result < ( ) > {
30+ develop_on_pre_shell ( prj) . await ?;
31+ develop_on_post_shell ( prj) . await ?;
3232 Ok ( ( ) )
3333}
3434
35- pub async fn hack_on_pre_shell ( prj : & Project ) -> anyhow:: Result < ( ) > {
35+ pub async fn develop_on_pre_shell ( prj : & Project ) -> anyhow:: Result < ( ) > {
3636 // Run relevant `om health` checks
3737 let health = NixHealth :: from_flake ( & prj. flake ) . await ?;
3838 let nix_info = NixInfo :: get ( )
@@ -78,7 +78,7 @@ pub async fn hack_on_pre_shell(prj: &Project) -> anyhow::Result<()> {
7878 Ok ( ( ) )
7979}
8080
81- pub async fn hack_on_post_shell ( prj : & Project ) -> anyhow:: Result < ( ) > {
81+ pub async fn develop_on_post_shell ( prj : & Project ) -> anyhow:: Result < ( ) > {
8282 eprintln ! ( ) ;
8383 print_markdown ( & prj. dir , prj. cfg . readme . get_markdown ( ) ) . await ?;
8484 Ok ( ( ) )
0 commit comments