-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for, and verify, all common web bundlers (#278)
Co-authored-by: Lucas Castro <lucasamonrc@gmail.com>
- Loading branch information
1 parent
8bf1da7
commit 7631e40
Showing
34 changed files
with
11,031 additions
and
88 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,30 @@ | ||
param ( | ||
[Parameter(Mandatory = $true)] | ||
[string]$bundlerName | ||
) | ||
try { | ||
Push-Location "$PSScriptRoot/samples/bundlers/$bundlerName" | ||
|
||
& npm ci | ||
|
||
if ($LASTEXITCODE -ne 0) { | ||
throw "npm ci failed" | ||
} | ||
|
||
Write-Host "Building bundler $bundlerName project..." | ||
|
||
&npm run build | ||
|
||
if ($LASTEXITCODE -ne 0) { | ||
throw "npm build $bundlerName failed" | ||
} | ||
} | ||
catch { | ||
Write-Host "An error occurred: $_" -ForegroundColor Red | ||
Exit 1 | ||
} | ||
finally { | ||
Pop-Location | ||
} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist/ |
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 @@ | ||
// build.js | ||
require("esbuild") | ||
.build({ | ||
entryPoints: ["index.js"], | ||
bundle: true, | ||
outfile: "dist/bundle.js", | ||
}) | ||
.catch(() => process.exit(1)); |
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,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>esbuild Example</title> | ||
</head> | ||
<body> | ||
<h1>Hello esbuild!</h1> | ||
<script src="dist/bundle.js"></script> <!-- The bundled file --> | ||
</body> | ||
</html> |
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 @@ | ||
import { launchPopup } from "@trinsic/web-ui"; | ||
|
||
launchPopup(() => Promise.resolve("https://google.com")); |
Oops, something went wrong.