Skip to content

Instantly share code, notes, and snippets.

@jinjagit
Last active July 3, 2020 15:31
Show Gist options
  • Save jinjagit/4335237fe61cd06efb6f6219046edaff to your computer and use it in GitHub Desktop.
Save jinjagit/4335237fe61cd06efb6f6219046edaff to your computer and use it in GitHub Desktop.
adds aliases to iex shell for liquidvoting API
# adds aliases and imports a / some module(s) to iex shell for liquidvoiting API
# rename to .iex.exs and place in API project root
# for dev environment, not production - add to / don't remove from your local gitignore
# <alias ... as> used to avoid referencing other module with name equivalent to alias
import Ecto.Query
alias LiquidVoting.Application, as: App
alias LiquidVoting.{
Delegations,
Metrics,
Release,
Repo,
Voting,
VotingResults,
VotingWeight
}
alias LiquidVoting.Delegations.Delegation
alias LiquidVoting.Voting.{Participant, Vote}
alias LiquidVoting.VotingResults.Result
alias LiquidVotingWeb.{
Endpoint,
ErrorHelpers, # API/lib/liquid_voting_web/views/
ErrorView, # API/lib/liquid_voting_web/views/
Router,
UserSocket # API/lib/liquid_voting_web/channels/
}
# LiquidVotingWeb.Gettext not aliased
alias LiquidVotingWeb.Plugs.Context
alias LiquidVotingWeb.Resolvers.Delegations, as: DelegationsResolver
alias LiquidVotingWeb.Resolvers.Voting, as: VotingResolver
alias LiquidVotingWeb.Resolvers.VotingResults, as: VotingResultsResolver
alias LiquidVotingWeb.Schema.{ChangesetErrors, Schema}
# no aliases defined for tests
@jinjagit
Copy link
Author

jinjagit commented Jul 3, 2020

good idea. done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment