File tree 1 file changed +13
-3
lines changed
1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -154,13 +154,23 @@ Promise.resolve()
154
154
} )
155
155
. then ( ( ) => {
156
156
// 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 => {
160
159
console . log ( `Copying ${ fileName } ...` ) ;
161
160
return copy ( fileName , path . join ( 'dist/angular-cli' , fileName ) ) ;
162
161
} ) ) ;
163
162
} )
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
+ } )
164
174
. then ( ( ) => process . exit ( 0 ) , ( err ) => {
165
175
console . error ( chalk . red ( err . message ) ) ;
166
176
process . exit ( 1 ) ;
You can’t perform that action at this time.
0 commit comments