{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/1780","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/1780/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/1780/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/1780/events","html_url":"https://github.com/Microsoft/vscode/issues/1780","id":124869781,"number":1780,"title":"Proposal: Usability Improvement Suggestions","user":{"login":"SetTrend","id":9283914,"avatar_url":"https://avatars.githubusercontent.com/u/9283914?v=3","gravatar_id":"","url":"https://api.github.com/users/SetTrend","html_url":"https://github.com/SetTrend","followers_url":"https://api.github.com/users/SetTrend/followers","following_url":"https://api.github.com/users/SetTrend/following{/other_user}","gists_url":"https://api.github.com/users/SetTrend/gists{/gist_id}","starred_url":"https://api.github.com/users/SetTrend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SetTrend/subscriptions","organizations_url":"https://api.github.com/users/SetTrend/orgs","repos_url":"https://api.github.com/users/SetTrend/repos","events_url":"https://api.github.com/users/SetTrend/events{/privacy}","received_events_url":"https://api.github.com/users/SetTrend/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-05T00:32:57Z","updated_at":"2016-01-05T00:47:50Z","closed_at":null,"body":"The approach of maintaining a task using two different files seems more pain than necessary to me. May I suggest a few improvements to the way projects are administered in VS Code:\r\n<br/>\r\n### Add `npm install` context menu to package.json file\r\n\r\nWhen cloning a project from GitHub or after editing the `package.json` file in VS Code, no Node module is getting downloaded. So currently it's required to leave VS Code and execute `npm install` in a command prompt.\r\n\r\nI suggest to add a context menu item to the Explorer when a `package.json` file is selected to simplify this task. The context menu item is suggested to run `npm install` from the directory of the `package.json` file:\r\n\r\n![package](https://cloud.githubusercontent.com/assets/9283914/12097398/d07d5402-b31b-11e5-961a-c3cb0e03769d.png)\r\n<br/>\r\n### Use `pragma comment` for running tasks in VS Code:\r\n\r\nMaintaining two distinct files to have tasks get run in VS Code seems more administration pain than necessary.\r\n\r\nI suggest to support a pragma comment preceding a task, fulfilling the same purpose as the `tasks.json` file does:\r\n\r\n```javascript\r\nvar gulp = require(\"gulp\");\r\nvar ts = require(\"gulp-typescript\");\r\n\r\n//# task { isShellCommand: true, isWatching: true, problemMatcher: \"$tsc\" }\r\ngulp.task(\"tsc\", function () { gulp.src().pipe(ts).pipe(gulp.dest()); })\r\n```\r\n(The `tasks.json` file may still be applied, e.g. for legacy/compatibility purposes or if a complex task configuration needs to be set. If both, a `# task` pragma comment and an entry in the `tasks.json` file existed for a task, any of the two definitions would prevail.)\r\n\r\n<br/>\r\n### Add `Run Task` context menu to any `.js` file containing a `# task` pragma comment\r\n\r\nCurrently, running a task requires much typing.\r\n\r\nI suggest to add a context menu to Explorer for any `.js` file containing a `# task` pragma comment so tasks can easily be browsed for and a task can simply be started by two clicks:\r\n\r\n![run task](https://cloud.githubusercontent.com/assets/9283914/12098333/f1cc0666-b321-11e5-8f50-cfc10fae09db.png)\r\n\r\nThe tasks in the list should be alphabetically sorted and the first task name letter should be used for the mnemonic, so starting a task could be as easy as `CTXT, T, L` for \"less\" or `CTXT, T, T` for \"tsc\" in the above screen shot.\r\n<br/>\r\n### Add option to automatically start tasks\r\nWhenever a project is opened in VS Code, which is indicated by the following preconditions:\r\n  * a folder gets opened which contains one or more `.json` files\r\n  * any of those `.json` files contains one or more `# task` pragma comments\r\n  * any of those `# task` pragma comments comes with an `autoStart: true` property set\r\n\r\n... then the tasks marked with `autoStart: true` should automatically be executed.\r\n\r\nHere's a screenshot depicting how the `autoStart: true` property is suggested to be applied:\r\n\r\n![auto run 1](https://cloud.githubusercontent.com/assets/9283914/12098517/2161e340-b323-11e5-854d-c4357cef5c60.png)\r\n<br/>\r\nDepending on user/workspace settings, a confirmation dialog might be displayed before the tasks are automatically getting started:\r\n\r\n![auto run 2](https://cloud.githubusercontent.com/assets/9283914/12098540/3f001566-b323-11e5-8381-5af2a884aacc.png)\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/comments/168856540","html_url":"https://github.com/Microsoft/vscode/issues/1780#issuecomment-168856540","issue_url":"https://api.github.com/repos/Microsoft/vscode/issues/1780","id":168856540,"user":{"login":"roslanr18","id":15937297,"avatar_url":"https://avatars.githubusercontent.com/u/15937297?v=3","gravatar_id":"","url":"https://api.github.com/users/roslanr18","html_url":"https://github.com/roslanr18","followers_url":"https://api.github.com/users/roslanr18/followers","following_url":"https://api.github.com/users/roslanr18/following{/other_user}","gists_url":"https://api.github.com/users/roslanr18/gists{/gist_id}","starred_url":"https://api.github.com/users/roslanr18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roslanr18/subscriptions","organizations_url":"https://api.github.com/users/roslanr18/orgs","repos_url":"https://api.github.com/users/roslanr18/repos","events_url":"https://api.github.com/users/roslanr18/events{/privacy}","received_events_url":"https://api.github.com/users/roslanr18/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T00:47:50Z","updated_at":"2016-01-05T00:47:50Z","body":"User@gmail.com\n"}}