@@ -44,7 +44,7 @@ export function createProject(name: string, ...args: string[]) {
44
44
. then ( ( ) => useDevKitSnapshots ( ) )
45
45
. then ( ( ) => argv [ 'ng2' ] ? useNg2 ( ) : Promise . resolve ( ) )
46
46
. then ( ( ) => argv [ 'ng4' ] ? useNg4 ( ) : Promise . resolve ( ) )
47
- . then ( ( ) => argv . nightly || argv [ 'ng-sha ' ] ? useSha ( ) : Promise . resolve ( ) )
47
+ . then ( ( ) => argv [ 'ng-snapshots' ] || argv [ 'ng-tag ' ] ? useSha ( ) : Promise . resolve ( ) )
48
48
. then ( ( ) => console . log ( `Project ${ name } created... Installing npm.` ) )
49
49
. then ( ( ) => silentNpm ( 'install' ) )
50
50
. then ( ( ) => useCIDefaults ( name ) ) ;
@@ -110,10 +110,13 @@ export function useBuiltPackages() {
110
110
111
111
export function useSha ( ) {
112
112
const argv = getGlobalVariable ( 'argv' ) ;
113
- if ( argv . nightly || argv [ 'ng-sha' ] ) {
114
- const label = argv [ 'ng-sha' ] ? `#2.0.0-${ argv [ 'ng-sha' ] } ` : '' ;
113
+ if ( argv [ 'ng-snapshots' ] || argv [ 'ng-tag' ] ) {
114
+ // We need more than the sha here, version is also needed. Examples of latest tags:
115
+ // 7.0.0-beta.4+dd2a650
116
+ // 6.1.6+4a8d56a
117
+ const label = argv [ 'ng-tag' ] ? argv [ 'ng-tag' ] : '' ;
115
118
return updateJsonFile ( 'package.json' , json => {
116
- // Install over the project with nightly builds.
119
+ // Install over the project with snapshot builds.
117
120
Object . keys ( json [ 'dependencies' ] || { } )
118
121
. filter ( name => name . match ( / ^ @ a n g u l a r \/ / ) )
119
122
. forEach ( name => {
@@ -135,6 +138,8 @@ export function useSha() {
135
138
json [ 'devDependencies' ] [ `@angular/${ pkgName } ` ]
136
139
= `github:angular/${ pkgName } -builds${ label } ` ;
137
140
} ) ;
141
+
142
+ json [ 'devDependencies' ] [ 'typescript' ] = '~3.0.1' ;
138
143
} ) ;
139
144
} else {
140
145
return Promise . resolve ( ) ;
@@ -143,7 +148,7 @@ export function useSha() {
143
148
144
149
export function useNgVersion ( version : string ) {
145
150
return updateJsonFile ( 'package.json' , json => {
146
- // Install over the project with nightly builds .
151
+ // Install over the project with specific versions .
147
152
Object . keys ( json [ 'dependencies' ] || { } )
148
153
. filter ( name => name . match ( / ^ @ a n g u l a r \/ / ) )
149
154
. forEach ( name => {
0 commit comments