Skip to content
Snippets Groups Projects
Verified Commit c3ed62a2 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

feat: Clean up example5 and improve HTML script readability

Summary of changes
- Removed unnecessary blank line in page.mjs for clarity.
- Reformatted the script tag in test.html for better readability and maintainability.
- Corrected attribute name in generate.go to be consistent with its expected usage.

Changes
- In page.mjs, eliminated a blank line before the console.log statement, enhancing the structure of the code.
- In test.html, the script tag for page.mjs now has its attributes spread across multiple lines, making it easier to read and modify in the future.
- In generate.go, the attribute name was changed from "data-bob-alias" to "data-bob-aliases" to accurately reflect its purpose and maintain consistency in the data model across the application.
parent 74bb4fd9
No related branches found
No related tags found
No related merge requests found
import {A} from "./lib.mjs"; import {A} from "./lib.mjs";
console.log(A); console.log(A);
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
<link rel="apple-touch-icon" href="/apple-touch-icon.png"/> <link rel="apple-touch-icon" href="/apple-touch-icon.png"/>
<script data-bob-source="source/main.mjs" data-bob-script-dist="scripts/main.mjs" data-bob-style-dist="styles/main.css" src="/scripts/main.mjs" type="module"></script> <script data-bob-source="source/main.mjs" data-bob-script-dist="scripts/main.mjs" data-bob-style-dist="styles/main.css" src="/scripts/main.mjs" type="module"></script>
<script data-bob-source="source/page.mjs" data-bob-target=es6 data-bob-script-dist="scripts/page.mjs" data-bob-style-dist="styles/page.css" src="/scripts/page.mjs" type="module"></script> <script data-bob-source="source/page.mjs"
data-bob-target=es6
data-bob-script-dist="scripts/page.mjs"
data-bob-style-dist="styles/page.css" src="/scripts/page.mjs" type="module"></script>
<script type="application/json" data-monster-role="translations" data-bob-reference="the-translation" data-replace="path:translations.the-translation.content"> <script type="application/json" data-monster-role="translations" data-bob-reference="the-translation" data-replace="path:translations.the-translation.content">
{ {
......
...@@ -39,7 +39,7 @@ func ParseHTMLFile(p string, development bool) error { ...@@ -39,7 +39,7 @@ func ParseHTMLFile(p string, development bool) error {
styleDist = attr.Val styleDist = attr.Val
} else if attr.Key == "data-bob-target" { } else if attr.Key == "data-bob-target" {
target = attr.Val target = attr.Val
} else if attr.Key == "data-bob-alias" { } else if attr.Key == "data-bob-aliases" {
val := strings.Split(attr.Val, ",") val := strings.Split(attr.Val, ",")
for _, alias := range val { for _, alias := range val {
parts := strings.Split(alias, ":") parts := strings.Split(alias, ":")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment