Skip to content

Commit e206bda

Browse files
authored
docs: Update Writing Generators guide, replace deprecated example (#363)
This example uses a few deprecated functions - Code.Module.parse/1 - Code.Module.proper_location/1 - Igniter.create_new_elixir_file/3
1 parent baf2aef commit e206bda

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

documentation/writing-generators.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ defmodule Mix.Tasks.YourLib.Gen.YourThing do
2323
def igniter(igniter) do
2424
[module_name | _] = igniter.args.argv
2525

26-
module_name = Igniter.Code.Module.parse(module_name)
27-
path = Igniter.Code.Module.proper_location(module_name)
26+
module_name = Igniter.Project.Module.parse(module_name)
27+
path = Igniter.Project.Module.proper_location(igniter, module_name)
2828
app_name = Igniter.Project.Application.app_name(igniter)
2929

3030
igniter
31-
|> Igniter.create_new_elixir_file(path, """
31+
|> Igniter.create_new_file(path, """
3232
defmodule #{inspect(module_name)} do
3333
use YourLib.Thing
3434

0 commit comments

Comments
 (0)