Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Haxe support * avoid unwrap * fix doc formatting * removed extra newline * fixed formatter and linter issues * fixed config file * better version of detecting contents of .haxerc Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * removed openfl related defaults from detect_files Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * fixed formatting * reworked reading .haxerc with fallback to haxe --version * fixed formatting * added fallback to executable for dev paths in .haxerc * fixed linter issue * added support for Windows paths * use or_else Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * use shorter version with `?` Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * simplified regex check removed check for "null" string * fixed format Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
492 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,9 @@ symbol = " " | |
[haskell] | ||
symbol = " " | ||
|
||
[haxe] | ||
symbol = "⌘ " | ||
|
||
[hg_branch] | ||
symbol = " " | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Clone, Deserialize, Serialize)] | ||
#[cfg_attr( | ||
feature = "config-schema", | ||
derive(schemars::JsonSchema), | ||
schemars(deny_unknown_fields) | ||
)] | ||
#[serde(default)] | ||
pub struct HaxeConfig<'a> { | ||
pub format: &'a str, | ||
pub version_format: &'a str, | ||
pub symbol: &'a str, | ||
pub style: &'a str, | ||
pub disabled: bool, | ||
pub detect_extensions: Vec<&'a str>, | ||
pub detect_files: Vec<&'a str>, | ||
pub detect_folders: Vec<&'a str>, | ||
} | ||
|
||
impl<'a> Default for HaxeConfig<'a> { | ||
fn default() -> Self { | ||
HaxeConfig { | ||
format: "via [$symbol($version )]($style)", | ||
version_format: "v${raw}", | ||
symbol: "⌘ ", | ||
style: "bold fg:202", | ||
disabled: false, | ||
detect_extensions: vec!["hx", "hxml"], | ||
detect_files: vec!["haxelib.json", "hxformat.json", ".haxerc"], | ||
detect_folders: vec![".haxelib", "haxe_libraries"], | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.