Skip to content

Commit 02c503a

Browse files
committed
chore: reorganize code
1 parent 9ba8f6a commit 02c503a

File tree

10 files changed

+15
-1969
lines changed

10 files changed

+15
-1969
lines changed

assets/tailwind.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ module.exports = {
1313
"./js/**/*.ts",
1414
"../lib/*_web.ex",
1515
"../lib/*_web/**/*.*ex",
16+
"../lib/*_cloud/**/*.*ex",
1617
"./svelte/**/*.svelte",
1718
"../priv/content/**/*.md",
1819
],

lib/algora/cloud.ex

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,14 @@ defmodule Algora.Cloud do
3737
apply(module, function, args)
3838
end
3939
end
40+
41+
defmacro use_if_available(quoted_module, opts \\ []) do
42+
module = Macro.expand(quoted_module, __CALLER__)
43+
44+
if Code.ensure_loaded?(module) do
45+
quote do
46+
use unquote(quoted_module), unquote(opts)
47+
end
48+
end
49+
end
4050
end

0 commit comments

Comments
 (0)