Packages

Provides css parsing in Elixir

Current section

Files

Jump to
css_parser lib parser file_reader.ex
Raw

lib/parser/file_reader.ex

defmodule CssParser.File do
@moduledoc """
File reading helper for css parsing.
"""
def parse_from_file(path) do
case File.read(path) do
{:ok, file} -> CssParser.parse(file)
{:error, _} -> [{:error, "File #{path} not found."}]
end
end
end