-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
62eac0f
commit 41d9624
Showing
7 changed files
with
62 additions
and
56 deletions.
There are no files selected for viewing
This file was deleted.
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// const esbuild = require("esbuild"); | ||
import * as esbuild from "esbuild"; | ||
|
||
const args = process.argv.slice(2); | ||
const watch = args.includes("--watch"); | ||
const deploy = args.includes("--deploy"); | ||
|
||
const loader = { | ||
// Add loaders for images/fonts/etc, e.g. { '.svg': 'file' } | ||
}; | ||
|
||
const plugins = [ | ||
// Add and configure plugins here | ||
]; | ||
|
||
let opts = { | ||
entryPoints: ["js/app.js", "js/app_tailwind.js"], | ||
bundle: true, | ||
target: "es2017", | ||
outdir: "../priv/static/assets", | ||
logLevel: "info", | ||
loader, | ||
plugins, | ||
}; | ||
|
||
if (deploy) { | ||
opts = { | ||
...opts, | ||
minify: true, | ||
}; | ||
} | ||
|
||
// const promise = esbuild.build(opts) | ||
const ctx = await esbuild.context(opts); | ||
|
||
if (watch) { | ||
await ctx.watch(); | ||
} | ||
|
||
await ctx.dispose(); // To free resources |
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
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<main role="main" class="container"> | ||
<p class="alert alert-info" role="alert"><%= Phoenix.Flash.get(@flash, :info) %></p> | ||
<p class="alert alert-danger" role="alert"><%= Phoenix.Flash.get(@flash, :error) %></p> | ||
<div :if={map_size(@flash) > 0}> | ||
<p class="alert alert-info" role="alert"><%= Phoenix.Flash.get(@flash, :info) %></p> | ||
<p class="alert alert-danger" role="alert"><%= Phoenix.Flash.get(@flash, :error) %></p> | ||
</div> | ||
<%= @inner_content %> | ||
</main> |
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