build(schematics): version placeholders not replaced (#13688)

Since we copy the schematics after the version placeholders have been inlined, the version range that uses the NG version placeholder is not replaced properly.

This is not problematic because by default we determine the NG version based on the installed `@angular/core` version.

```
 addPackageToPackageJson(host, '@angular/animations',
        ngCoreVersionTag || requiredAngularVersionRange);
```
This commit is contained in:
Paul Gschwendtner
2018-10-29 16:12:46 +01:00
committed by Jeremy Elbourn
parent ab5127b6e1
commit c4331048ec
+6 -4
View File
@@ -48,16 +48,18 @@ export function composeRelease(buildPackage: BuildPackage) {
copyFiles(packagesDir, 'README.md', releasePath);
copyFiles(sourceDir, 'package.json', releasePath);
// This must happen before replacing the version placeholders because the schematics
// could use the version placeholders for setting up specific dependencies within `ng-add`.
if (buildPackage.hasSchematics) {
copyFiles(join(packageOut, 'schematics'), '**/*', join(releasePath, 'schematics'));
}
replaceVersionPlaceholders(releasePath);
insertPackageJsonVersionStamp(join(releasePath, 'package.json'));
createTypingsReexportFile(releasePath, './typings/index', name);
createMetadataReexportFile(releasePath, './typings/index', name, importAsName);
if (buildPackage.hasSchematics) {
copyFiles(join(packageOut, 'schematics'), '**/*', join(releasePath, 'schematics'));
}
if (buildPackage.secondaryEntryPoints.length) {
createFilesForSecondaryEntryPoint(buildPackage, releasePath);
}