Update emoji support

* Add constants for emojis
* Move emoji shortcode rendering to Markup
* Add documentation
* Add example
* Add tests
This commit is contained in:
Patrik Svensson
2020-09-18 01:58:55 +02:00
committed by Patrik Svensson
parent 090b30f731
commit eeb3f967b6
38 changed files with 17680 additions and 1878 deletions

View File

@ -4,6 +4,7 @@
$Output = Join-Path $PSScriptRoot "Temp"
$Source = Join-Path $PSScriptRoot "/../../src/Spectre.Console"
$Docs = Join-Path $PSScriptRoot "/../../docs/src/Data"
if(!(Test-Path $Output -PathType Container)) {
New-Item -ItemType Directory -Path $Output | Out-Null
@ -11,7 +12,7 @@ if(!(Test-Path $Output -PathType Container)) {
# Generate the files
Push-Location Generator
&dotnet run -- emoji "$Output"
&dotnet run -- emoji "$Output" --input $Output
if(!$?) {
Pop-Location
Throw "An error occured when generating code."
@ -19,4 +20,5 @@ if(!$?) {
Pop-Location
# Copy the files to the correct location
Copy-Item (Join-Path "$Output" "Emoji.Generated.cs") -Destination "$Source/Emoji.Generated.cs"
Copy-Item (Join-Path "$Output" "Emoji.Generated.cs") -Destination "$Source/Emoji.Generated.cs"
Copy-Item (Join-Path "$Output" "emojis.json") -Destination "$Docs/emojis.json"