Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@macbookandrew
Last active August 24, 2023 18:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macbookandrew/f98d35ee87763ca91e19172388334a8f to your computer and use it in GitHub Desktop.
Save macbookandrew/f98d35ee87763ca91e19172388334a8f to your computer and use it in GitHub Desktop.
Laravel VS Code Workspace Tasks

Runs these tasks automatically when the workspace is opened:

  1. npm run dev: recompiles assets when modified; useful for Tailwind JIT mode, Vite, etc.
  2. php artisan horizon: runs Horizon queue monitor
  3. php artisan schedule:work: runs scheduled tasks
{
"folders": [
// list of folders in the workspace
],
"settings": {
"task.allowAutomaticTasks": "on"
},
"tasks": {
"version": "2.0.0",
"tasks": [
{
"label": "npm dev",
"type": "shell",
"command": "npm run dev",
"problemMatcher": [],
"runOptions": {
"runOn": "folderOpen"
}
},
{
"label": "npm build",
"type": "shell",
"command": "npm run build",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "laravel horizon",
"type": "shell",
"command": "php artisan horizon",
"problemMatcher": [],
"runOptions": {
"runOn": "folderOpen"
}
},
{
"label": "laravel scheduler",
"type": "shell",
"command": "php artisan schedule:work",
"problemMatcher": [],
"runOptions": {
"runOn": "folderOpen"
}
},
// Optional: run Stripe CLI to forward webhooks to the app
// {
// "label": "stripe cli",
// "type": "shell",
// "command": "stripe listen --project-name stripe-project-name --forward-to https://myapp.test/stripe-webhooks",
// "problemMatcher": [],
// "runOptions": {
// "runOn": "folderOpen"
// }
// }
]
}
// other configs
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment