synopkg 14.0.1

Consistent dependency versions in large JavaScript Monorepos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{cli::Cli, rcfile::Rcfile};

#[derive(Debug)]
pub struct Config {
  pub cli: Cli,
  pub rcfile: Rcfile,
}

impl Config {
  /// Read the rcfile from stdin and fall back to defaults if none was sent
  pub fn from_cli(cli: Cli) -> Config {
    Config {
      rcfile: Rcfile::from_disk(&cli),
      cli,
    }
  }
}