Skip to content

Commit 0b0ed9d

Browse files
committed
Add link to playground
1 parent 370a34d commit 0b0ed9d

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"lint": "oxlint",
3232
"prepack": "tsc",
3333
"test": "node --test test/*.test.ts",
34-
"playground": "npx rolldown src/parser.ts -f esm -m -o playground/parser.js && npx rolldown src/printer.ts -f esm -m -o playground/printer.js"
34+
"playground": "npx rolldown src/parser.ts -f esm -m -o playground/parser.js && npx rolldown src/printer.ts -f esm -m -o playground/printer.js && sed -i 's/id=\"version\">[^<]*/id=\"version\">'\"$(node -p \"require('.\\x2fpackage.json').version\")\"'/' playground/index.html"
3535
},
3636
"devDependencies": {
3737
"@ericcornelissen/bash-parser": "^0.5.3",

playground/index.html

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,18 @@
1313
height: 100vh;
1414
display: grid;
1515
grid-template-columns: 1fr 1fr;
16-
grid-template-rows: auto 1fr;
16+
grid-template-rows: auto auto 1fr;
17+
}
18+
header {
19+
grid-column: 1 / -1;
20+
padding: 0.5rem 1rem;
21+
background: black;
22+
font-size: 1rem;
23+
text-align: right;
24+
}
25+
header a {
26+
color: whitesmoke;
27+
text-decoration: none;
1728
}
1829
textarea,
1930
#print {
@@ -43,11 +54,14 @@
4354
overflow: auto;
4455
background: whitesmoke;
4556
grid-column: 2;
46-
grid-row: 1 / -1;
57+
grid-row: 2 / -1;
4758
}
4859
</style>
4960
</head>
5061
<body>
62+
<header>
63+
<a href="https://github.com/webpro-nl/unbash">unbash <span id="version">2.1.0</span></a>
64+
</header>
5165
<textarea id="input" spellcheck="false">
5266
echo "hello $USER"
5367
for f in *.log; do

0 commit comments

Comments
 (0)