Skip to content

Instantly share code, notes, and snippets.

@koptionalsoftware
Last active November 20, 2019 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koptionalsoftware/197c8856ca999bad97d2a3ae69268063 to your computer and use it in GitHub Desktop.
Save koptionalsoftware/197c8856ca999bad97d2a3ae69268063 to your computer and use it in GitHub Desktop.
#create an action and some mutations. Use camelCasing for the action!
hygen asyncaction new fetchData
## The above is equivalent to:
# hygen action new fetchData
# hygen mutation new fetchDataStart
# hygen mutation new fetchDataSuccess
# hygen mutation new fetchDataFailure
#create a module
# users = the name of the module directory
hygen vuexmodule new --module=users
#inject the actions / mutations into the module
# The module and actions / mutations must exist first! ( see previous steps )
hygen vuexactions new fetchData --module=users
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment