Materialize v0.1.4-dev Materialize

This package install materialize-css to you project.

Installation

If available in Hex, the package can be installed by adding materialize to your list of dependencies in mix.exs:

def deps do
  [{:materialize, "~> 0.1.1"}]
end

Next you need get deps:

$ mix deps.get

And run mix task:

$ mix materialize.install

Result

Task materialize.install do next:

  • npm - run npm install materialize-css —save-dev
  • dist - copy js, css files to web/static/vendor/materialize
  • fonts - copy dir fonts to web/static/assets
  • brunch - append instructions to brunch-config.js

After install you have next structure:

    project_dir
    ...
    |--priv
        |--static
            |--css
                |--materialize.css
                |--materialize.min.css
            |--js
                |--materialize.js
                |--materialize.min.js
    ...
    |--web
        |--static
            |--assets
                |--fonts
        |--vendor
            |--materialize
               |--css
                   |--materialize.css
                   |--materialize.min.css
               |--js
                   |--materialize.js
                   |--materialize.min.js
    ...

Use materialize-css in you template project:

    # web/templates/layout/app.html.eex

    <link rel="stylesheet" href="<%= static_path(@conn, "/css/materialize.css") %>">

    <script src="<%= static_path(@conn, "/js/materialize.js") %>"></script>

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/materialize.