Skip to content

Commit

Permalink
fix(new): fix relativeRootPath for typeRoots
Browse files Browse the repository at this point in the history
Fix #2206
Close #2597
  • Loading branch information
filipesilva committed Oct 10, 2016
1 parent 9554ade commit eb2f939
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
"<%= relativeRootPath %>/node_modules/@types"
]
}
}
4 changes: 2 additions & 2 deletions packages/angular-cli/blueprints/ng2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ module.exports = {
this.styleExt = options.style;
this.version = require(path.resolve(__dirname, '../../package.json')).version;

// Join with / not path.sep as reference to typings require forward slashes.
const relativeRootPath = options.sourceDir.split(path.sep).map(() => '..').join('/');
// Split/join with / not path.sep as reference to typings require forward slashes.
const relativeRootPath = options.sourceDir.split('/').map(() => '..').join('/');
const fullAppName = stringUtils.dasherize(options.entity.name)
.replace(/-(.)/g, (_, l) => ' ' + l.toUpperCase())
.replace(/^./, (l) => l.toUpperCase());
Expand Down

0 comments on commit eb2f939

Please sign in to comment.