Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

Convert to TS2.0 and support 'paths' and 'baseUrl' properties #11

Merged
merged 5 commits into from
Aug 4, 2016

Conversation

agubler
Copy link
Member

@agubler agubler commented Aug 3, 2016

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 using tsc with a tsconfig.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 customised tsconfig.json created at runtime based on the projects tsconfig.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 if paths is detected in the compilerOptions section of the tsconfig.

Consumers of the new tasks will need to add .tsconfig*.json to the projects .gitignore file.

resolves #10

}
return glob;
});
if (tsconfig.filesGlob) {
Copy link
Member Author

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

@codecov-io
Copy link

codecov-io commented Aug 3, 2016

Current coverage is 31.57% (diff: 100%)

Merging #11 into master will decrease coverage by 0.85%

@@             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          

Powered by Codecov. Last update 1f8f882...f60ed29

@@ -1,7 +1,7 @@
sudo: false
language: node_js
node_js:
- "4.1"
- "6.1"
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

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. 😞

@kitsonk kitsonk merged commit cdfd3b6 into dojo:master Aug 4, 2016
@dylans dylans added this to the 2016.08 milestone Oct 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support TS2.0 paths compiler options
5 participants