-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add beet.contrib.template_context
- Loading branch information
Showing
5 changed files
with
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
"""Plugin that exposes the beet context in templates""" | ||
|
||
|
||
from beet import Context | ||
|
||
|
||
def beet_default(ctx: Context): | ||
ctx.template.env.globals["ctx"] = ctx |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"require": ["beet.contrib.template_context"], | ||
"data_pack": { | ||
"load": ["src"], | ||
"render": { | ||
|
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
2 changes: 2 additions & 0 deletions
2
...snapshots/examples__build_load_scoreboard__0.data_pack/data/demo/functions/foo.mcfunction
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
scoreboard players operation @s 78g8qs26j9ajw += @s 2k6kiizeukf3w | ||
|
||
scoreboard players operation @s 5w2mdgpu9wvnf += @s 79agx41duqbaj |
2 changes: 2 additions & 0 deletions
2
...__build_load_scoreboard__0.data_pack/data/load_scoreboard/functions/scoreboard.mcfunction
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
scoreboard objectives add from_config dummy | ||
scoreboard objectives add 78g8qs26j9ajw dummy "load_scoreboard.0" | ||
scoreboard objectives add 2k6kiizeukf3w dummy "load_scoreboard.foo" | ||
scoreboard objectives add 5w2mdgpu9wvnf dummy "load_scoreboard.thing.0" | ||
scoreboard objectives add 79agx41duqbaj dummy "load_scoreboard.thing.foo" |