     get_files(File.join(["deps", atom_to_binary(dep), "ebin"]))
   end
 
-  defp elixir_files do
-    {:file, e} = :code.is_loaded(:elixir)
+  defp app_files(module) do
+    {:file, e} = :code.is_loaded(module)
     get_files(File.dirname(e))
   end
 

    files = [gen_main(filename, project[:escript_main_module])|files]
    embed_elixir = project[:escript_embed_elixir] || false
    if embed_elixir do
      files = files++elixir_files
    end
    files = files++Enum.reduce(project[:deps] || [], [], function do
      {dep, _, _}, acc -> acc++dep_files(dep)

  * `escript_embed_elixir` - if true embed elixir in the escript file
    Defaults to false

  * `escript_embed_extra_apps` - embed additional applications
    Defaults to []
    This is only used if `escript_embed_elixir` is true.
    Example: [EEx, IEx, Mix, ExUnit]

  * `escript_shebang`
    Defaults to "#! /usr/bin/env escript\\n"

