Update to new version of MBU (replaces FBU)
This commit is contained in:
parent
c947970d52
commit
719f6b525e
14 changed files with 27 additions and 31 deletions
|
@ -1,7 +1,7 @@
|
||||||
defmodule Mix.Tasks.Frontend.Build.Css.Compile do
|
defmodule Mix.Tasks.Frontend.Build.Css.Compile do
|
||||||
use FBU.BuildTask
|
use MBU.BuildTask
|
||||||
import MebeWeb.FrontendConfs
|
import MebeWeb.FrontendConfs
|
||||||
import FBU.TaskUtils
|
import MBU.TaskUtils
|
||||||
|
|
||||||
@shortdoc "Build the SCSS sources"
|
@shortdoc "Build the SCSS sources"
|
||||||
|
|
||||||
|
@ -13,11 +13,7 @@ defmodule Mix.Tasks.Frontend.Build.Css.Compile do
|
||||||
"-o",
|
"-o",
|
||||||
out_path(),
|
out_path(),
|
||||||
"--source-map",
|
"--source-map",
|
||||||
"true",
|
"true"
|
||||||
"--include-path",
|
|
||||||
Path.join([node_path(), "boostrap-sass", "assets", "stylesheets"]),
|
|
||||||
"--precision",
|
|
||||||
"8"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
def scss_file(), do: Path.join([src_path(), "css", "app.scss"])
|
def scss_file(), do: Path.join([src_path(), "css", "app.scss"])
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
defmodule Mix.Tasks.Frontend.Build.Css.Copy do
|
defmodule Mix.Tasks.Frontend.Build.Css.Copy do
|
||||||
use FBU.BuildTask
|
use MBU.BuildTask
|
||||||
import MebeWeb.FrontendConfs
|
import MebeWeb.FrontendConfs
|
||||||
|
|
||||||
@shortdoc "Copy compiled CSS to target dir"
|
@shortdoc "Copy compiled CSS to target dir"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
defmodule Mix.Tasks.Frontend.Build.Css do
|
defmodule Mix.Tasks.Frontend.Build.Css do
|
||||||
use FBU.BuildTask
|
use MBU.BuildTask
|
||||||
import FBU.TaskUtils
|
import MBU.TaskUtils
|
||||||
|
|
||||||
@shortdoc "Build the frontend CSS"
|
@shortdoc "Build the frontend CSS"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
defmodule Mix.Tasks.Frontend.Build.Css.Minify do
|
defmodule Mix.Tasks.Frontend.Build.Css.Minify do
|
||||||
use FBU.BuildTask
|
use MBU.BuildTask
|
||||||
import MebeWeb.FrontendConfs
|
import MebeWeb.FrontendConfs
|
||||||
import FBU.TaskUtils
|
import MBU.TaskUtils
|
||||||
|
|
||||||
@shortdoc "Minify built CSS files"
|
@shortdoc "Minify built CSS files"
|
||||||
@preferred_cli_env :prod
|
@preferred_cli_env :prod
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
defmodule Mix.Tasks.Frontend.Build do
|
defmodule Mix.Tasks.Frontend.Build do
|
||||||
use FBU.BuildTask
|
use MBU.BuildTask
|
||||||
import FBU.TaskUtils
|
import MBU.TaskUtils
|
||||||
|
|
||||||
@shortdoc "Build the frontend"
|
@shortdoc "Build the frontend"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
defmodule Mix.Tasks.Frontend.Build.Js.Bundle do
|
defmodule Mix.Tasks.Frontend.Build.Js.Bundle do
|
||||||
use FBU.BuildTask
|
use MBU.BuildTask
|
||||||
import MebeWeb.FrontendConfs
|
import MebeWeb.FrontendConfs
|
||||||
import FBU.TaskUtils
|
import MBU.TaskUtils
|
||||||
|
|
||||||
@shortdoc "Bundle the JavaScript sources into app.js"
|
@shortdoc "Bundle the JavaScript sources into app.js"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
defmodule Mix.Tasks.Frontend.Build.Js.Copy do
|
defmodule Mix.Tasks.Frontend.Build.Js.Copy do
|
||||||
use FBU.BuildTask
|
use MBU.BuildTask
|
||||||
import MebeWeb.FrontendConfs
|
import MebeWeb.FrontendConfs
|
||||||
|
|
||||||
@shortdoc "Copy bundled JS to target dir"
|
@shortdoc "Copy bundled JS to target dir"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
defmodule Mix.Tasks.Frontend.Build.Js do
|
defmodule Mix.Tasks.Frontend.Build.Js do
|
||||||
use FBU.BuildTask
|
use MBU.BuildTask
|
||||||
import FBU.TaskUtils
|
import MBU.TaskUtils
|
||||||
|
|
||||||
@shortdoc "Build the frontend JavaScript"
|
@shortdoc "Build the frontend JavaScript"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
defmodule Mix.Tasks.Frontend.Build.Js.Minify do
|
defmodule Mix.Tasks.Frontend.Build.Js.Minify do
|
||||||
use FBU.BuildTask
|
use MBU.BuildTask
|
||||||
import MebeWeb.FrontendConfs
|
import MebeWeb.FrontendConfs
|
||||||
import FBU.TaskUtils
|
import MBU.TaskUtils
|
||||||
|
|
||||||
@shortdoc "Minify built JS files"
|
@shortdoc "Minify built JS files"
|
||||||
@preferred_cli_env :prod
|
@preferred_cli_env :prod
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
defmodule Mix.Tasks.Frontend.Build.Js.Transpile do
|
defmodule Mix.Tasks.Frontend.Build.Js.Transpile do
|
||||||
use FBU.BuildTask
|
use MBU.BuildTask
|
||||||
import MebeWeb.FrontendConfs
|
import MebeWeb.FrontendConfs
|
||||||
import FBU.TaskUtils
|
import MBU.TaskUtils
|
||||||
|
|
||||||
@shortdoc "Transpile JS sources to ES5"
|
@shortdoc "Transpile JS sources to ES5"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
defmodule Mix.Tasks.Frontend.Clean do
|
defmodule Mix.Tasks.Frontend.Clean do
|
||||||
use FBU.BuildTask
|
use MBU.BuildTask
|
||||||
import MebeWeb.FrontendConfs
|
import MebeWeb.FrontendConfs
|
||||||
|
|
||||||
@shortdoc "Clean build artifacts"
|
@shortdoc "Clean build artifacts"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
defmodule Mix.Tasks.Frontend.Watch do
|
defmodule Mix.Tasks.Frontend.Watch do
|
||||||
use FBU.BuildTask
|
use MBU.BuildTask
|
||||||
import FBU.TaskUtils
|
import MBU.TaskUtils
|
||||||
alias Mix.Tasks.Frontend.Build.Js.Transpile, as: TranspileJS
|
alias Mix.Tasks.Frontend.Build.Js.Transpile, as: TranspileJS
|
||||||
alias Mix.Tasks.Frontend.Build.Js.Bundle, as: BundleJS
|
alias Mix.Tasks.Frontend.Build.Js.Bundle, as: BundleJS
|
||||||
alias Mix.Tasks.Frontend.Build.Js.Copy, as: CopyJS
|
alias Mix.Tasks.Frontend.Build.Js.Copy, as: CopyJS
|
||||||
|
@ -23,13 +23,13 @@ defmodule Mix.Tasks.Frontend.Watch do
|
||||||
watch(
|
watch(
|
||||||
"JSBundle",
|
"JSBundle",
|
||||||
TranspileJS.out_path(),
|
TranspileJS.out_path(),
|
||||||
fn _, _ -> run_task(BundleJS, deps: false) end
|
BundleJS
|
||||||
),
|
),
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
"JSCopy",
|
"JSCopy",
|
||||||
BundleJS.out_path(),
|
BundleJS.out_path(),
|
||||||
fn _, _ -> run_task(CopyJS, deps: false) end
|
CopyJS
|
||||||
),
|
),
|
||||||
|
|
||||||
exec(
|
exec(
|
||||||
|
@ -43,7 +43,7 @@ defmodule Mix.Tasks.Frontend.Watch do
|
||||||
watch(
|
watch(
|
||||||
"CSSCopy",
|
"CSSCopy",
|
||||||
CompileCSS.out_path(),
|
CompileCSS.out_path(),
|
||||||
fn _, _ -> run_task(CopyCSS, deps: false) end
|
CopyCSS
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|> listen(watch: true)
|
|> listen(watch: true)
|
||||||
|
|
2
mix.exs
2
mix.exs
|
@ -40,7 +40,7 @@ defmodule MebeWeb.Mixfile do
|
||||||
{:earmark, "~> 1.2.0"},
|
{:earmark, "~> 1.2.0"},
|
||||||
{:slugger, github: "h4cc/slugger", ref: "98e907f85d34e6c8a94270249318bdad6f838198"},
|
{:slugger, github: "h4cc/slugger", ref: "98e907f85d34e6c8a94270249318bdad6f838198"},
|
||||||
{:calendar, "~> 0.17.2"},
|
{:calendar, "~> 0.17.2"},
|
||||||
{:fbu, github: "Nicd/fbu"}
|
{:mbu, "~> 0.2.4"}
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
2
mix.lock
2
mix.lock
|
@ -3,10 +3,10 @@
|
||||||
"cowboy": {:hex, :cowboy, "1.0.4", "a324a8df9f2316c833a470d918aaf73ae894278b8aa6226ce7a9bf699388f878", [:make, :rebar], [{:cowlib, "~> 1.0.0", [hex: :cowlib, optional: false]}, {:ranch, "~> 1.0", [hex: :ranch, optional: false]}]},
|
"cowboy": {:hex, :cowboy, "1.0.4", "a324a8df9f2316c833a470d918aaf73ae894278b8aa6226ce7a9bf699388f878", [:make, :rebar], [{:cowlib, "~> 1.0.0", [hex: :cowlib, optional: false]}, {:ranch, "~> 1.0", [hex: :ranch, optional: false]}]},
|
||||||
"cowlib": {:hex, :cowlib, "1.0.2", "9d769a1d062c9c3ac753096f868ca121e2730b9a377de23dec0f7e08b1df84ee", [:make], []},
|
"cowlib": {:hex, :cowlib, "1.0.2", "9d769a1d062c9c3ac753096f868ca121e2730b9a377de23dec0f7e08b1df84ee", [:make], []},
|
||||||
"earmark": {:hex, :earmark, "1.2.0", "bf1ce17aea43ab62f6943b97bd6e3dc032ce45d4f787504e3adf738e54b42f3a", [:mix], []},
|
"earmark": {:hex, :earmark, "1.2.0", "bf1ce17aea43ab62f6943b97bd6e3dc032ce45d4f787504e3adf738e54b42f3a", [:mix], []},
|
||||||
"fbu": {:git, "https://github.com/Nicd/fbu.git", "6b1729f4a7c8607fcd115be5a48fbba9865d0eed", []},
|
|
||||||
"fs": {:hex, :fs, "2.12.0", "ad631efacc9a5683c8eaa1b274e24fa64a1b8eb30747e9595b93bec7e492e25e", [:rebar3], []},
|
"fs": {:hex, :fs, "2.12.0", "ad631efacc9a5683c8eaa1b274e24fa64a1b8eb30747e9595b93bec7e492e25e", [:rebar3], []},
|
||||||
"hackney": {:hex, :hackney, "1.7.1", "e238c52c5df3c3b16ce613d3a51c7220a784d734879b1e231c9babd433ac1cb4", [:rebar3], [{:certifi, "1.0.0", [hex: :certifi, optional: false]}, {:idna, "4.0.0", [hex: :idna, optional: false]}, {:metrics, "1.0.1", [hex: :metrics, optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, optional: false]}, {:ssl_verify_fun, "1.1.1", [hex: :ssl_verify_fun, optional: false]}]},
|
"hackney": {:hex, :hackney, "1.7.1", "e238c52c5df3c3b16ce613d3a51c7220a784d734879b1e231c9babd433ac1cb4", [:rebar3], [{:certifi, "1.0.0", [hex: :certifi, optional: false]}, {:idna, "4.0.0", [hex: :idna, optional: false]}, {:metrics, "1.0.1", [hex: :metrics, optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, optional: false]}, {:ssl_verify_fun, "1.1.1", [hex: :ssl_verify_fun, optional: false]}]},
|
||||||
"idna": {:hex, :idna, "4.0.0", "10aaa9f79d0b12cf0def53038547855b91144f1bfcc0ec73494f38bb7b9c4961", [:rebar3], []},
|
"idna": {:hex, :idna, "4.0.0", "10aaa9f79d0b12cf0def53038547855b91144f1bfcc0ec73494f38bb7b9c4961", [:rebar3], []},
|
||||||
|
"mbu": {:hex, :mbu, "0.2.4", "abb1a660d90ed90fd5e7d1027ffcecffed2057fbeedc7a1aae4832231021fd5f", [:mix], [{:fs, "~> 2.12.0", [hex: :fs, optional: false]}]},
|
||||||
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], []},
|
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], []},
|
||||||
"mime": {:hex, :mime, "1.1.0", "01c1d6f4083d8aa5c7b8c246ade95139620ef8effb009edde934e0ec3b28090a", [:mix], []},
|
"mime": {:hex, :mime, "1.1.0", "01c1d6f4083d8aa5c7b8c246ade95139620ef8effb009edde934e0ec3b28090a", [:mix], []},
|
||||||
"mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], []},
|
"mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], []},
|
||||||
|
|
Reference in a new issue