Packages

This is a CMS written in Elixir. Aims to be the great open-source ecommerce and/or startup solution for those who are searching for a performance and stability on top of modern technologies like React and Elixir.

Current section

Files

Jump to
lyn lib mix tasks webpack.analyseapp.ex
Raw

lib/mix/tasks/webpack.analyseapp.ex

defmodule Mix.Tasks.Webpack.Analyseapp do
@shortdoc "Generate webpack stats analysing application, resulting priv/static is meant to be versionned"
def run(_args) do
File.rm_rf!("priv/static")
{_,0} = System.cmd("git",["clone","-b","ajax-sse-loading","https://github.com/awetzel/analyse"], into: IO.stream(:stdio, :line))
{_,0} = System.cmd("npm",["install"], into: IO.stream(:stdio, :line), cd: "analyse")
{_,0} = System.cmd("grunt",[], into: IO.stream(:stdio, :line), cd: "analyse")
File.cp_r!("analyse/dist", "priv/static")
File.rm_rf!("analyse")
end
end