-
Notifications
You must be signed in to change notification settings - Fork 16
Convert to TS2.0 and support 'paths' and 'baseUrl' properties #11
Conversation
} | ||
return glob; | ||
}); | ||
if (tsconfig.filesGlob) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
required as for TS2.0 configs filesGlob
is replaced by include
Current coverage is 31.57% (diff: 100%)@@ master #11 diff @@
==========================================
Files 4 4
Lines 37 38 +1
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 12 12
- Misses 25 26 +1
Partials 0 0
|
@@ -1,7 +1,7 @@ | |||
sudo: false | |||
language: node_js | |||
node_js: | |||
- "4.1" | |||
- "6.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should just go with "6" as that will always raise it to the latest of Node.js instead of being "stuck" at 6.1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I took the example from widgets
. I'll do the same with the package template PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was an idiot with widgets! Upon debating it with @novemberborn I realised that it was best to use 6
with Travis. 😞
Converted to TS2.0 and target ES6.
Add support for
paths
/baseUrl
compile properties supported from TS2.0 onwards, currently the only way to support these properties is by usingtsc
with atsconfig.json
not command line arguments (error TS6064: Option 'paths' can only be specified in 'tsconfig.json' file.
).To do this each of the
grunt-ts
targets has a customisedtsconfig.json
created at runtime based on the projectstsconfig.json
using the convention.tsconfig*.json
replacing*
with a meaningful description i.e..tsconfigDist.json
.The changes are backwards compatible so that any existing consumers will continue to leverage the
grunt-ts
tasks as previously configured and the new task configuration will only be used ifpaths
is detected in thecompilerOptions
section of thetsconfig
.Consumers of the new tasks will need to add
.tsconfig*.json
to the projects.gitignore
file.resolves #10