Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Mar 12, 2024
1 parent 8ae6c88 commit b6dd307
Show file tree
Hide file tree
Showing 14 changed files with 2,149 additions and 181 deletions.
176 changes: 176 additions & 0 deletions crates/sync-npm-dependencies-with-nix/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions crates/sync-npm-dependencies-with-nix/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "sync-npm-dependencies-with-nix"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.81"
parse-flake-lock = { git = "https://github.com/DeterminateSystems/flake-checker", branch = "main" }
walkdir = "2.5.0"
26 changes: 26 additions & 0 deletions crates/sync-npm-dependencies-with-nix/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
use anyhow::Result;
use std::path::Path;

use parse_flake_lock::{FlakeLock, FlakeLockParseError};

use walkdir::WalkDir;

fn main() -> Result<()> {
for entry in WalkDir::new(".").into_iter().filter_map(|e| e.ok()) {
let f_name = entry.file_name().to_string_lossy();

if f_name == "package.json" {
println!("{}", f_name);
}
}

Ok(())
}

// fn main() -> Result<(), FlakeLockParseError> {
// let flake_lock = FlakeLock::new(Path::new("flake.lock"))?;

// println!("asdf {flake_lock:?}");

// Ok(())
// }
Loading

0 comments on commit b6dd307

Please sign in to comment.