@@ -44,7 +44,7 @@ export function createProject(name: string, ...args: string[]) {
4444 . then ( ( ) => useDevKitSnapshots ( ) )
4545 . then ( ( ) => argv [ 'ng2' ] ? useNg2 ( ) : Promise . resolve ( ) )
4646 . 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 ( ) )
4848 . then ( ( ) => console . log ( `Project ${ name } created... Installing npm.` ) )
4949 . then ( ( ) => silentNpm ( 'install' ) )
5050 . then ( ( ) => useCIDefaults ( name ) ) ;
@@ -110,10 +110,13 @@ export function useBuiltPackages() {
110110
111111export function useSha ( ) {
112112 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' ] : '' ;
115118 return updateJsonFile ( 'package.json' , json => {
116- // Install over the project with nightly builds.
119+ // Install over the project with snapshot builds.
117120 Object . keys ( json [ 'dependencies' ] || { } )
118121 . filter ( name => name . match ( / ^ @ a n g u l a r \/ / ) )
119122 . forEach ( name => {
@@ -135,6 +138,8 @@ export function useSha() {
135138 json [ 'devDependencies' ] [ `@angular/${ pkgName } ` ]
136139 = `github:angular/${ pkgName } -builds${ label } ` ;
137140 } ) ;
141+
142+ json [ 'devDependencies' ] [ 'typescript' ] = '~3.0.1' ;
138143 } ) ;
139144 } else {
140145 return Promise . resolve ( ) ;
@@ -143,7 +148,7 @@ export function useSha() {
143148
144149export function useNgVersion ( version : string ) {
145150 return updateJsonFile ( 'package.json' , json => {
146- // Install over the project with nightly builds .
151+ // Install over the project with specific versions .
147152 Object . keys ( json [ 'dependencies' ] || { } )
148153 . filter ( name => name . match ( / ^ @ a n g u l a r \/ / ) )
149154 . forEach ( name => {
0 commit comments