@@ -15,7 +15,7 @@ const glob = require('glob');
1515const argv = minimist ( process . argv . slice ( 3 ) ) ;
1616
1717// Matches all Typescript definition files for Material.
18- const typingsGlob = join ( DIST_MATERIAL , '**/*.d.ts' ) ;
18+ const typingsGlob = join ( DIST_MATERIAL , '**/*.+( d.ts|metadata.json) ' ) ;
1919// Matches the "package.json" and "README.md" file that needs to be shipped.
2020const assetsGlob = join ( COMPONENTS_DIR , '+(package.json|README.md)' ) ;
2121// Matches all UMD bundles inside of the bundles distribution.
@@ -35,11 +35,11 @@ task(':package:release', sequenceTask(
3535 ':package:metadata' ,
3636) ) ;
3737
38- /** Copy metatadata.json and associated d.ts files to the root of the package structure. */
38+ /** Writes a re-export metadata */
3939task ( ':package:metadata' , ( ) => {
40- // See: https://github.com/angular/angular/blob/master/build.sh#L293-L294
41- copySync ( join ( DIST_MATERIAL , 'index. metadata.json' ) ,
42- join ( DIST_RELEASE , 'material.metadata.json' ) ) ;
40+ const metadataReExport =
41+ `{"__symbolic":"module","version":3," metadata":{},"exports":[{"from":"./typings/index"}]}` ;
42+ writeFileSync ( join ( DIST_RELEASE , 'material.metadata.json' ) , metadataReExport , 'utf-8' ) ;
4343} ) ;
4444
4545/** Inlines the html and css resources into all metadata.json files in dist/ */
0 commit comments