File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
// BUILD STEP IMPLEMENTATIONS
2
2
import { discoverPackages } from './steps/package' ;
3
3
import { rimraf } from './util/rimraf' ;
4
+ import { copyFiles } from './util/copy' ;
4
5
import { generateNgBundle } from './bundler' ;
5
6
import { PackageSearchResult } from './model/package-search-result' ;
7
+
8
+ // Node API
6
9
import * as path from 'path' ;
7
10
8
11
// Logging
@@ -39,6 +42,9 @@ export async function createNgPackage(opts: NgPackagrCliArguments): Promise<void
39
42
await generateNgBundle ( secondaryPackage ) ;
40
43
}
41
44
45
+ await copyFiles ( `${ rootPackage . sourcePath } /README.md` , rootPackage . destinationPath ) ;
46
+ await copyFiles ( `${ rootPackage . sourcePath } /LICENSE` , rootPackage . destinationPath ) ;
47
+
42
48
log . success ( `Built Angular library from ${ rootPackage . sourcePath } , written to ${ rootPackage . destinationPath } ` ) ;
43
49
} catch ( error ) {
44
50
// Report error messages and throw the error further up
Original file line number Diff line number Diff line change @@ -231,9 +231,6 @@ export async function discoverPackages(rootPath: string): Promise<PackageSearchR
231
231
export async function writePackage ( ngPkg : NgPackageData , packageArtifacts : NgArtifacts ) : Promise < void > {
232
232
233
233
log . debug ( 'writePackage' ) ;
234
- await copyFiles ( `${ ngPkg . sourcePath } /**/*.md` , ngPkg . destinationPath ) ;
235
- await copyFiles ( `${ ngPkg . sourcePath } /LICENSE` , ngPkg . destinationPath ) ;
236
-
237
234
const packageJson : any = await readJson ( path . resolve ( ngPkg . sourcePath , 'package.json' ) ) ;
238
235
// set additional properties
239
236
for ( const fieldName in packageArtifacts ) {
You can’t perform that action at this time.
0 commit comments