DEV Community

Cover image for Initializing the project
Diego Novais
Diego Novais

Posted on β€’ Edited on

4

Initializing the project

About the Project

Now that we know how the game works, let's create the project and some initial settings.

Creating the project

To create the project, we can run the command:

mix new rock_paper_scissor_elixir --module Game
Enter fullscreen mode Exit fullscreen mode

We can specify the main module name of our project by passing --module NameOfTheModule. And own main module will call Game.

  • Adding the test coverage tool As a good practice, we'll create our project with the maximum test coverage. And now we'll add the library test coverage tool: coveralls.
# /mix.exs
#...
  defp deps do
    [
      {:excoveralls, "~> 0.10", only: :test}
    ]
  end
#...
Enter fullscreen mode Exit fullscreen mode
  • Adding the static code analysis tool Now we'll add the lib Credo, a static code analysis tool for the Elixir language focused on helping us maintain the code's quality and consistency.
# /mix.exs
#...
  defp deps do
    [
      {:excoveralls, "~> 0.10", only: :test},
      {:credo, "~> 1.6", only: [:dev, :test], runtime: false}
    ]
  end
#...
Enter fullscreen mode Exit fullscreen mode

And then, we need to install the dependencies running this command:

mix deps.get
Enter fullscreen mode Exit fullscreen mode

In the next post, we'll build the tests.

Contacts

Email: contato@diegonovais.com.br
Linkedin: https://www.linkedin.com/in/diegonovais/
Twitter: https://twitter.com/diegonovaistech

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

πŸ‘₯ Ideal for solo developers, teams, and cross-company projects

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay