File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -154,13 +154,23 @@ Promise.resolve()
154154 } )
155155 . then ( ( ) => {
156156 // Copy all resources that might have been missed.
157- return Promise . all ( [
158- 'CHANGELOG.md' , 'CONTRIBUTING.md' , 'LICENSE' , 'README.md'
159- ] . map ( fileName => {
157+ const extraFiles = [ 'CHANGELOG.md' , 'CONTRIBUTING.md' , 'README.md' ] ;
158+ return Promise . all ( extraFiles . map ( fileName => {
160159 console . log ( `Copying ${ fileName } ...` ) ;
161160 return copy ( fileName , path . join ( 'dist/angular-cli' , fileName ) ) ;
162161 } ) ) ;
163162 } )
163+ . then ( ( ) => {
164+ // Copy LICENSE into all the packages
165+ console . log ( `Copying LICENSE...` ) ;
166+
167+ const packages = require ( '../../lib/packages' ) ;
168+ return Promise . all ( Object . keys ( packages ) . map ( pkgName => {
169+ const pkg = packages [ pkgName ] ;
170+ console . log ( ` ${ pkgName } ` ) ;
171+ return copy ( 'LICENSE' , path . join ( pkg . dist , 'LICENSE' ) ) ;
172+ } ) ) ;
173+ } )
164174 . then ( ( ) => process . exit ( 0 ) , ( err ) => {
165175 console . error ( chalk . red ( err . message ) ) ;
166176 process . exit ( 1 ) ;
You can’t perform that action at this time.
0 commit comments