Last active
March 28, 2020 22:43
-
-
Save seanwash/3274e66a4ca25334eebec05bcaeaee55 to your computer and use it in GitHub Desktop.
VS Code Elixir Tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
// | |
// Mix Tasks | |
// | |
{ | |
"label": "mix.compile (force)", | |
"command": "mix compile --force", | |
"type": "shell", | |
"problemMatcher": ["$mixCompileWarning", "$mixCompileError"], | |
}, | |
{ | |
"label": "mix deps.get", | |
"command": "mix deps.get", | |
"type": "shell", | |
"problemMatcher": ["$mixCompileWarning", "$mixCompileError"], | |
}, | |
// | |
// Ecto Tasks | |
// | |
{ | |
"label": "mix ecto.migrate", | |
"command": "mix ecto.migrate", | |
"type": "shell", | |
"problemMatcher": ["$mixCompileWarning", "$mixCompileError"], | |
}, | |
{ | |
"label": "mix ecto.rollback", | |
"command": "mix ecto.rollback", | |
"type": "shell", | |
"problemMatcher": ["$mixCompileWarning", "$mixCompileError"], | |
}, | |
{ | |
"label": "MIX_ENV=test mix ecto.reset", | |
"command": "mix ecto.reset", | |
"type": "shell", | |
"problemMatcher": ["$mixCompileWarning", "$mixCompileError"], | |
"options": { | |
"env": { "MIX_ENV": "test" } | |
} | |
}, | |
// | |
// Phoenix Tasks | |
// | |
{ | |
"label": "Phoenix Server with Jobs", | |
"command": "iex -S mix phx.server", | |
"type": "shell", | |
"problemMatcher": ["$mixCompileWarning", "$mixCompileError"], | |
"options": { | |
"env": { "ENABLE_JOBS": "true" } | |
} | |
}, | |
{ | |
"label": "Phoenix Server", | |
"command": "iex -S mix phx.server", | |
"type": "shell", | |
"problemMatcher": ["$mixCompileWarning", "$mixCompileError"], | |
"options": { | |
"env": { "ENABLE_JOBS": "false" } | |
} | |
}, | |
// | |
// Test Tasks | |
// | |
{ | |
"label": "Run Focused Test", | |
"command": "mix test ${relativeFile}:${lineNumber}", | |
"type": "shell", | |
"group": "test", | |
"problemMatcher": ["$mixCompileWarning", "$mixTestFailure"], | |
}, | |
{ | |
"label": "Run Focused Test (test.watch)", | |
"command": "mix test.watch ${relativeFile}:${lineNumber}", | |
"type": "shell", | |
"group": "test", | |
"problemMatcher": ["$mixCompileWarning", "$mixTestFailure"], | |
}, | |
{ | |
"label": "Test Current File", | |
"command": "mix test ${relativeFile}", | |
"group": "test", | |
"type": "shell", | |
"problemMatcher": ["$mixCompileWarning", "$mixTestFailure"], | |
}, | |
{ | |
"label": "Test Current File (test.watch)", | |
"command": "mix test.watch ${relativeFile}", | |
"group": "test", | |
"type": "shell", | |
"problemMatcher": ["$mixCompileWarning", "$mixTestFailure"], | |
}, | |
{ | |
"label": "Run All Tests", | |
"command": "mix test", | |
"type": "shell", | |
"group": "test", | |
"problemMatcher": ["$mixCompileWarning", "$mixTestFailure"], | |
}, | |
{ | |
"label": "Run All Tests (test.watch)", | |
"command": "mix test.watch", | |
"type": "shell", | |
"group": "test", | |
"problemMatcher": ["$mixCompileWarning", "$mixTestFailure"], | |
}, | |
{ | |
"label": "Run Stale Tests", | |
"command": "mix test --stale", | |
"type": "shell", | |
"group": "test", | |
"problemMatcher": ["$mixCompileWarning", "$mixTestFailure"], | |
}, | |
{ | |
"label": "Run Stale Tests (test.watch)", | |
"command": "mix test.watch --stale", | |
"type": "shell", | |
"group": "test", | |
"problemMatcher": ["$mixCompileWarning", "$mixTestFailure"], | |
}, | |
// | |
// Other | |
// | |
{ | |
"label": "delete .elixir_ls", | |
"command": "rm -rf .elixir_ls", | |
"type": "shell" | |
}, | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment