File tree 2 files changed +7
-4
lines changed 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -152,14 +152,17 @@ TsBasicCompiler = class TsBasicCompiler {
152
152
// then standardized path will be typings/foo/foo.d.ts.
153
153
_getStandardTypingsFilePath ( file ) {
154
154
let filePath = file . getPathInPackage ( ) ;
155
- let dirPath = ts . getDirectoryPath ( ts . normalizePath ( filePath ) ) ;
155
+ let dirPath = ts . getDirectoryPath (
156
+ ts . normalizePath ( filePath ) ) . replace ( / ^ t y p i n g s \/ ? / , '' ) ;
156
157
let pkgName = file . getPackageName ( ) ;
157
158
if ( pkgName . indexOf ( ':' ) != - 1 ) {
158
159
pkgName = pkgName . split ( ':' ) [ 1 ] ;
159
160
}
160
- let pkgTest = new RegExp ( `.*\/${ pkgName } (\/.+|$)` ) ;
161
+ let pkgTest = new RegExp ( `^\/?${ pkgName } (\/.+|$)` ) ;
162
+ // Check if the path starts with the package name.
161
163
if ( pkgTest . test ( dirPath ) === false ) {
162
- let pkgDirPath = ts . combinePaths ( dirPath , pkgName ) ;
164
+ let pkgDirPath = ts . combinePaths (
165
+ ts . combinePaths ( 'typings' , pkgName ) , dirPath ) ;
163
166
let fileName = ts . getBaseFileName ( filePath ) ;
164
167
filePath = ts . combinePaths ( pkgDirPath , fileName ) ;
165
168
}
Original file line number Diff line number Diff line change 1
1
Package . describe ( {
2
2
name : 'barbatus:ts-compilers' ,
3
- version : '0.2.7 ' ,
3
+ version : '0.2.8 ' ,
4
4
summary : 'TypeScript Compilers for Meteor' ,
5
5
git : 'https://github.com/barbatus/ts-compilers' ,
6
6
documentation : 'README.md'
You can’t perform that action at this time.
0 commit comments