-
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
esbuild plugin: add proper support for lume url rewrites #685
- Loading branch information
1 parent
1ddf11e
commit 460142d
Showing
8 changed files
with
847 additions
and
92 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
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,10 +1,15 @@ | ||
/// <reference lib="dom" /> | ||
import toUppercase from "./modules/to_uppercase.ts"; | ||
import toUppercase, { toLowercase } from "./modules/to_uppercase.ts"; | ||
import data from "./data.json"; | ||
|
||
// https://github.com/lumeland/lume/issues/442 | ||
import "https://esm.sh/v127/[email protected]/denonext/prop-types.development.mjs"; | ||
|
||
document.querySelectorAll("h1")?.forEach((h1) => { | ||
h1.innerHTML = toUppercase(h1.innerHTML + data.foo); | ||
|
||
toLowercase(h1.innerHTML) | ||
.then(lower => { | ||
h1.innerHTML = lower; | ||
}); | ||
}); |
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,9 @@ | ||
export default function toUppercase(text: string) { | ||
return text.toUpperCase(); | ||
} | ||
|
||
export async function toLowercase(text: string) { | ||
const { toLowercase } = await import("../other/to_lowercase.ts"); | ||
|
||
return toLowercase(text); | ||
} |
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,3 @@ | ||
export function toLowercase(text: string) { | ||
return text.toLowerCase(); | ||
} |
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