mirror of
https://github.com/sharkdp/bat
synced 2026-08-07 19:31:42 +00:00
Don't take a HighlightingAssets detour to build assets (#1802)
Move code to build assets to its own file. That results in better modularity and flexibility. It also allows us to simplify HighlightingAssets a lot, since it will now always be initialized with a SerializedSyntaxSet.
This commit is contained in:
+1
-2
@@ -50,8 +50,7 @@ fn build_assets(matches: &clap::ArgMatches) -> Result<()> {
|
||||
|
||||
let blank = matches.is_present("blank");
|
||||
|
||||
let assets = bat::assets::HighlightingAssets::from_files(source_dir, !blank)?;
|
||||
assets.save_to_cache(target_dir, clap::crate_version!())
|
||||
bat::assets::build(source_dir, !blank, target_dir, clap::crate_version!())
|
||||
}
|
||||
|
||||
fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user