{"action":"created","issue":{"url":"https://api.github.com/repos/atsu85/aurelia-cli-experiment/issues/1","repository_url":"https://api.github.com/repos/atsu85/aurelia-cli-experiment","labels_url":"https://api.github.com/repos/atsu85/aurelia-cli-experiment/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/atsu85/aurelia-cli-experiment/issues/1/comments","events_url":"https://api.github.com/repos/atsu85/aurelia-cli-experiment/issues/1/events","html_url":"https://github.com/atsu85/aurelia-cli-experiment/pull/1","id":161808443,"number":1,"title":"Typescript in aurelia project","user":{"login":"atsu85","id":1206512,"avatar_url":"https://avatars.githubusercontent.com/u/1206512?v=3","gravatar_id":"","url":"https://api.github.com/users/atsu85","html_url":"https://github.com/atsu85","followers_url":"https://api.github.com/users/atsu85/followers","following_url":"https://api.github.com/users/atsu85/following{/other_user}","gists_url":"https://api.github.com/users/atsu85/gists{/gist_id}","starred_url":"https://api.github.com/users/atsu85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atsu85/subscriptions","organizations_url":"https://api.github.com/users/atsu85/orgs","repos_url":"https://api.github.com/users/atsu85/repos","events_url":"https://api.github.com/users/atsu85/events{/privacy}","received_events_url":"https://api.github.com/users/atsu85/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-22T23:20:12Z","updated_at":"2016-06-29T17:48:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/atsu85/aurelia-cli-experiment/pulls/1","html_url":"https://github.com/atsu85/aurelia-cli-experiment/pull/1","diff_url":"https://github.com/atsu85/aurelia-cli-experiment/pull/1.diff","patch_url":"https://github.com/atsu85/aurelia-cli-experiment/pull/1.patch"},"body":"# main idea\r\nCurrently build scripts, generators etc are typescript scripts when aurelia project is generated with TypeScript transpiler selection. Right now it doesn't add much value, as IDEs (at least Atom) won't do anything with them, because aurela_project folder is not included in tsconfig.json\r\n\r\n## changes\r\n* added as much TS declarations using as available through `typings`\r\n* added aurelia_project/tsconfig.json to be able to compile TS from aurelia_project folder\r\n* changed syntax for importing json files, so that TypeScript compiler would work with them\r\n\r\n## future work\r\nSome TS declarations are still missing. See the `tsc` output bellow\r\n\r\n### TypeScript compiler output from aurelia_project folder\r\n```cmd\r\n../typings/globals/glob-stream/index.d.ts(6,40): error TS2305: Module 'glob' has no exported member 'IOptions'.\r\ntasks/process-css.ts(5,21): error TS2307: Cannot find module 'aurelia-cli'.\r\ntasks/process-markup.ts(2,33): error TS2307: Cannot find module 'gulp-changed-in-place'.\r\ntasks/process-markup.ts(4,21): error TS2307: Cannot find module 'aurelia-cli'.\r\ntasks/transpile.ts(2,33): error TS2307: Cannot find module 'gulp-changed-in-place'.\r\ntasks/transpile.ts(5,25): error TS2307: Cannot find module 'gulp-notify'.\r\ntasks/transpile.ts(6,25): error TS2497: Module '\"gulp-rename\"' resolves to a non-module entity and cannot be imported using this construct.\r\ntasks/transpile.ts(9,33): error TS2307: Cannot find module 'aurelia-cli'.\r\ngenerators/attribute.ts(2,52): error TS2307: Cannot find module 'aurelia-cli'.\r\ngenerators/binding-behavior.ts(2,52): error TS2307: Cannot find module 'aurelia-cli'.\r\ngenerators/element.ts(2,52): error TS2307: Cannot find module 'aurelia-cli'.\r\ngenerators/generator.ts(2,52): error TS2307: Cannot find module 'aurelia-cli'.\r\ngenerators/task.ts(2,52): error TS2307: Cannot find module 'aurelia-cli'.\r\ngenerators/task.ts(16,66): error TS2304: Cannot find name 'functionName'.\r\ngenerators/value-converter.ts(2,52): error TS2307: Cannot find module 'aurelia-cli'.\r\ntasks/build.ts(5,21): error TS2307: Cannot find module 'aurelia-cli'.\r\ntasks/run.ts(5,26): error TS2307: Cannot find module 'aurelia-cli'.\r\ntasks/run.ts(19,17): error TS2345: Argument of type '{ online: boolean; open: boolean; port: number; server: { baseDir: string[]; middleware: (req: an...' is not assignable to parameter of type 'Options'.\r\n  Types of property 'server' are incompatible.\r\n    Type '{ baseDir: string[]; middleware: (req: any, res: any, next: any) => void; }' is not assignable to type 'ServerOptions'.\r\n      Types of property 'middleware' are incompatible.\r\n        Type '(req: any, res: any, next: any) => void' is not assignable to type '(MiddlewareHandler | PerRouteMiddleware)[]'.\r\n          Property 'push' is missing in type '(req: any, res: any, next: any) => void'.\r\ntasks/test.ts(3,26): error TS2307: Cannot find module 'aurelia-cli'.\r\n```"},"comment":{"url":"https://api.github.com/repos/atsu85/aurelia-cli-experiment/issues/comments/229434197","html_url":"https://github.com/atsu85/aurelia-cli-experiment/pull/1#issuecomment-229434197","issue_url":"https://api.github.com/repos/atsu85/aurelia-cli-experiment/issues/1","id":229434197,"user":{"login":"atsu85","id":1206512,"avatar_url":"https://avatars.githubusercontent.com/u/1206512?v=3","gravatar_id":"","url":"https://api.github.com/users/atsu85","html_url":"https://github.com/atsu85","followers_url":"https://api.github.com/users/atsu85/followers","following_url":"https://api.github.com/users/atsu85/following{/other_user}","gists_url":"https://api.github.com/users/atsu85/gists{/gist_id}","starred_url":"https://api.github.com/users/atsu85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atsu85/subscriptions","organizations_url":"https://api.github.com/users/atsu85/orgs","repos_url":"https://api.github.com/users/atsu85/repos","events_url":"https://api.github.com/users/atsu85/events{/privacy}","received_events_url":"https://api.github.com/users/atsu85/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T17:48:54Z","updated_at":"2016-06-29T17:48:54Z","body":"@EisenbergEffect \r\n> Compilation works fine without it.\r\n\r\nYes, You can compile the application fine without aurelia_project/tsconfig.json, but (as i undertand) the main tsconfig.json file is for the application itself (aurelia_project is [not inlcuded in main tsconfig.json](https://github.com/atsu85/aurelia-cli-experiment/blob/master/tsconfig.json#L18-L23)) and not for build scripts, etc in aurelia_project folder.\r\n\r\nTo be able to use autocomplete and detect errors from TS files in aurelia_project, I added aurelia_project/tsconfig.json (that [includes TS files from aurelia_project folder](https://github.com/atsu85/aurelia-cli-experiment/pull/1/files#diff-ac3267019f6a6514eec955025a837b41R16), not from application source code). By doing that, I also found errors from TS files in aurelia_project folder (and sent the PR's, that are merged by now).\r\n"}}
{"actor":{"display_login":"atsu85"}}