Skip to content

Commit

Permalink
Merge branch 'PipeScript-vNext' of https://github.com/StartAutomating…
Browse files Browse the repository at this point in the history
…/PipeScript into PipeScript-vNext
  • Loading branch information
James Brundage committed Nov 11, 2023
2 parents 13c19f9 + fa8880b commit 2e11762
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions Tests/Examples/Language.HTML.examples.tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

describe 'Language.HTML' {
it 'Language.HTML Example 1' {
.> {
$HtmlWithInlinePipeScript = @'
<html>
<head>
<title>
Joke of the Day
</title>
<style>
.Joke {
font-size: 1.5em;
width: 100%;
}
.JokeSetup {
font-size: 1.1em;
text-align: center;
}
.JokePunchLine {
font-size: 1.25em;
text-align: center;
}
.Datestamp {
position:fixed;
bottom: 0;
left: 0;
}
</style>
</head>
<body>
<!--{
"<div class='Joke'>" + $(
Invoke-RestMethod -Uri 'https://v2.jokeapi.dev/joke/Any' |
Foreach-Object {
if ($_.Joke) { $_.Joke}
elseif ($_.Setup -and $_.Delivery) {
"<div class='JokeSetup'>" + $_.Setup + "</div>"
"<div class='JokePunchline'>" + $_.Delivery + "</div>"
}
}
) + "</div>"
"<div class='Datestamp'>" +
"Last Updated:" +
(Get-Date | Out-String) +
"</div>"
}-->
</body>
</html>
'@
[OutputFile(".\Index.ps.html")]$HtmlWithInlinePipeScript
}
$htmlFile = .> .\Index.ps.html
}
}

0 comments on commit 2e11762

Please sign in to comment.