Skip to content

Commit

Permalink
🩹 [Patch]: Add Update workflow and align with Fonts 1.1.13 (#23)
Browse files Browse the repository at this point in the history
## Description

This pull request includes several changes to update the NerdFonts data
management and installation process. The most important changes include
creating a new GitHub Actions workflow, updating the script to fetch and
store font data, and adding improvements to the `Install-NerdFont`
function.

### Workflow and Data Management Improvements:
*
[`.github/workflows/Update-FontsData.yml`](diffhunk://#diff-5c6d6ac6744e613c22fe7a4b5bf6b9fbd4b3bf5548239191e4400a4b17440826R1-R22):
Added a new GitHub Actions workflow to update the fonts data
automatically.
*
[`scripts/Update-FontsData.ps1`](diffhunk://#diff-69d235ffacf154789a70d5e00a557ee83393c256cd9431a8b7be57cc41c3ad89R1-R19):
Created a new script to fetch the latest NerdFonts release data and
update the `FontsData.json` file.
*
[`src/FontsData.json`](diffhunk://#diff-33dde50ea708acb8c36bc487c62e0cc6f4718c1562403aa6b975f00e3921253aR1-R278):
Added a new JSON file to store the NerdFonts data.
*
[`src/variables/private/NerdFonts.ps1`](diffhunk://#diff-523a444fd193c01d2c025f89aaa7e014da2cdccfdba8d6efce0fd507e90146efL1-R1):
Modified the script to load font data from the new `FontsData.json`
file.
  * Fixes #22 

### Function Enhancements:
*
[`src/functions/public/Get-NerdFont.ps1`](diffhunk://#diff-b3f6234dd4f55afe9de8daa4a7b43d8e17df21dbf18f9b96e2a32a950a1699caL4-R25):
Enhanced the `Get-NerdFont` function with additional examples and output
type.
[[1]](diffhunk://#diff-b3f6234dd4f55afe9de8daa4a7b43d8e17df21dbf18f9b96e2a32a950a1699caL4-R25)
[[2]](diffhunk://#diff-b3f6234dd4f55afe9de8daa4a7b43d8e17df21dbf18f9b96e2a32a950a1699caL24-R35)
*
[`src/functions/public/Install-NerdFont.ps1`](diffhunk://#diff-805a4a6beeb97eef72e8ff0b1bb90dee541f9da03df2803ab0a42416e5a8e794L1-R1):
Improved the `Install-NerdFont` function to support wildcards, added a
`Force` parameter, and updated the temporary path handling.
[[1]](diffhunk://#diff-805a4a6beeb97eef72e8ff0b1bb90dee541f9da03df2803ab0a42416e5a8e794L1-R1)
[[2]](diffhunk://#diff-805a4a6beeb97eef72e8ff0b1bb90dee541f9da03df2803ab0a42416e5a8e794R16-R20)
[[3]](diffhunk://#diff-805a4a6beeb97eef72e8ff0b1bb90dee541f9da03df2803ab0a42416e5a8e794L32-R44)
[[4]](diffhunk://#diff-805a4a6beeb97eef72e8ff0b1bb90dee541f9da03df2803ab0a42416e5a8e794L50-R60)
[[5]](diffhunk://#diff-805a4a6beeb97eef72e8ff0b1bb90dee541f9da03df2803ab0a42416e5a8e794L63-R123)
  * Fixes #20 

### Test and Completer Updates:
*
[`src/functions/public/completers.ps1`](diffhunk://#diff-3fe835f6ce34a7629f6514efa69656682414f2ca2c0110769140674ab4717810L1-R5):
Updated the argument completer script for `Get-NerdFont` and
`Install-NerdFont` functions.
*
[`tests/NerdFonts.Tests.ps1`](diffhunk://#diff-09e259de0851773ef8f4802051f6bfdfa4cae0984dd7486be3f78bb5751419caL3-L6):
Refined the test cases for `Get-NerdFont` and `Install-NerdFont`
functions.
[[1]](diffhunk://#diff-09e259de0851773ef8f4802051f6bfdfa4cae0984dd7486be3f78bb5751419caL3-L6)
[[2]](diffhunk://#diff-09e259de0851773ef8f4802051f6bfdfa4cae0984dd7486be3f78bb5751419caL21-R22)

### Minor Fixes:
*
[`.github/linters/.markdown-lint.yml`](diffhunk://#diff-2fd3619d2b7372123257bc21645edb90c24293e66babbc6053033a89e21bab34L9-R17):
Corrected the capitalization and punctuation settings for markdown
linting.
*
[`src/classes/private/Scope.ps1`](diffhunk://#diff-9f8b649c9594a7c7582dae3baf1841e8ffa82e1cbb7e1fae8b560b56f141e6f1L1-R1):
Fixed encoding issue in the `Scope` enum definition.

These changes collectively enhance the automation, functionality, and
maintainability of the NerdFonts management scripts.

## Type of change

<!-- Use the check-boxes [x] on the options that are relevant. -->

- [ ] 📖 [Docs]
- [ ] 🪲 [Fix]
- [x] 🩹 [Patch]
- [ ] ⚠️ [Security fix]
- [ ] 🚀 [Feature]
- [ ] 🌟 [Breaking change]

## Checklist

<!-- Use the check-boxes [x] on the options that are relevant. -->

- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
  • Loading branch information
MariusStorhaug authored Jan 15, 2025
1 parent 1dc1005 commit 5d0ba91
Show file tree
Hide file tree
Showing 15 changed files with 900 additions and 127 deletions.
18 changes: 9 additions & 9 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
# - https://github.com/DavidAnson/markdownlint

###############
# Rules by id #
# Rules by ID #
###############
MD004: false # Unordered list style
MD004: false # Unordered list style
MD007:
indent: 2 # Unordered list indentation
indent: 2 # Unordered list indentation
MD013:
line_length: 808 # Line length
line_length: 808 # Line length
MD026:
punctuation: ".,;:!。,;:" # List of not allowed
MD029: false # Ordered list item prefix
MD033: false # Allow inline HTML
MD036: false # Emphasis used instead of a heading
punctuation: '.,;:!。,;:' # List of not allowed
MD029: false # Ordered list item prefix
MD033: false # Allow inline HTML
MD036: false # Emphasis used instead of a heading

#################
# Rules by tags #
#################
blank_lines: false # Error on blank lines
blank_lines: false # Error on blank lines
8 changes: 4 additions & 4 deletions .github/linters/.powershell-psscriptanalyzer.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
@{
#CustomRulePath='path\to\CustomRuleModule.psm1'
#RecurseCustomRulePath='path\of\customrules'
#Severity = @(
# 'Error'
# 'Warning'
#)
# Severity = @(
# 'Error'
# 'Warning'
# )
#IncludeDefaultRules=${true}
ExcludeRules = @(
'PSMissingModuleManifestField'
Expand Down
Loading

0 comments on commit 5d0ba91

Please sign in to comment.