AvinZarlez / processing-vscode

A Visual Studio Code extension for the programming language Processing
https://marketplace.visualstudio.com/items?itemName=Tobiah.language-pde
MIT License
177 stars 25 forks source link

Improvement suggestion for tasks.json #7

Closed lhnrd closed 6 years ago

lhnrd commented 7 years ago

I have some suggestions to improve the tasks.json file:

  1. Upgrade to tasks 2.0.0
  2. Add task to open p5.js projects on browser
  3. Add tasks to open processing and p5.js references

tasks.json example:

{
  "version": "2.0.0",
  "type": "shell",
  "tasks": [
    {
      "taskName": "Run processing sketch",
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "command": "processing-java",
      "args": [
        "--force",
        "--sketch=${workspaceRoot}",
        "--output=${workspaceRoot}/out",
        "--run"
      ]
    },
    {
      "taskName": "Run p5 script",
      "group": "build",
      "command": "/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome",
      "args": [
        "${workspaceRoot}/index.html",
        "--disable-gpu"
      ],
      "presentation": {
        "reveal": "never",
        "echo": false
      },
      "problemMatcher": []
    },
    {
      "taskName": "Open Processing reference",
      "command": "/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome",
      "args": [
        "file:///Applications/Processing.app/Contents/Java/modes/java/reference/index.html",
        "--disable-gpu"
      ],
      "presentation": {
        "reveal": "never",
        "echo": false
      },
      "problemMatcher": []
    },
    {
      "taskName": "Open p5 reference",
      "command": "/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome",
      "args": [
        "https://p5js.org/reference/",
        "--disable-gpu"
      ],
      "presentation": {
        "reveal": "never",
        "echo": false
      },
      "problemMatcher": []
    }
  ]
}
AvinZarlez commented 7 years ago

These are good tasks, but it assumed that the user A) is using Mac and B) is using Chrome, so would probably need to be generalized and the user told they need to write the path to their browser of choice (using the path of the operating system of choice)

Should be easy to tweak the task file and add the appropriate guide/information

AvinZarlez commented 6 years ago

Fixed pathing for mac and updated to 2.0.0 in #15