feat(typings): allow declaration of reference paths

Without this feature, each bundle would have to create its own typings
template to include references to dependent typings. Now, the references
can be declared in JS, along with other meta information about the 
bundle typings.


Closes #3540
This commit is contained in:
Jeff Cross
2015-08-07 16:42:36 -07:00
parent 1562bc91ba
commit 1f692ae263
4 changed files with 15 additions and 9 deletions

View File

@ -42,20 +42,23 @@ module.exports = new Package('angular-v2-docs', [jsdocPackage, nunjucksPackage,
'angular2/router.ts'
];
readTypeScriptModules.basePath = path.resolve(path.resolve(__dirname, '../../modules'));
createTypeDefinitionFile.typeDefinitions = [
{
id: 'angular2/angular2',
references: ['../es6-promise/es6-promise.d.ts', '../rx/rx.d.ts'],
modules: {
'angular2/angular2': 'angular2/angular2',
}
},
{
id: 'angular2/router',
//Right now the typings live in the same directory, but eventually will not. See #3458
references: ['../angular2/angular2.d.ts'],
modules: {
'angular2/router': 'angular2/router'
}
}
}
];
})