11import { spawn } from 'child_process' ;
2- import { existsSync , statSync , writeFileSync , readFileSync } from 'fs-extra' ;
3- import { join , basename } from 'path' ;
4- import { task , src , dest } from 'gulp' ;
2+ import { existsSync , readFileSync , statSync , writeFileSync } from 'fs-extra' ;
3+ import { basename , join } from 'path' ;
4+ import { dest , src , task } from 'gulp' ;
55import { execNodeTask , execTask , sequenceTask } from '../util/task_helpers' ;
66import {
7- DIST_RELEASE , DIST_BUNDLES , DIST_MATERIAL , COMPONENTS_DIR , LICENSE_BANNER , DIST_ROOT
7+ COMPONENTS_DIR ,
8+ DIST_BUNDLES ,
9+ DIST_MATERIAL ,
10+ DIST_RELEASE ,
11+ DIST_ROOT ,
12+ LICENSE_BANNER ,
13+ PROJECT_ROOT ,
814} from '../constants' ;
915import * as minimist from 'minimist' ;
1016
@@ -40,7 +46,16 @@ task('build:release', sequenceTask(
4046
4147/** Task that combines intermediate build artifacts into the release package structure. */
4248task ( ':package:release' , sequenceTask (
43- [ ':package:typings' , ':package:umd' , ':package:fesm' , ':package:assets' , ':package:theming' ] ,
49+ // Run in parallel
50+ [
51+ ':package:typings' ,
52+ ':package:umd' ,
53+ ':package:fesm' ,
54+ ':package:assets' ,
55+ ':package:theming' ,
56+ ':package:license'
57+ ] ,
58+ // Run in sequence
4459 ':inline-metadata-resources' ,
4560 ':package:metadata' ,
4661) ) ;
@@ -75,8 +90,12 @@ task(':inline-metadata-resources', () => {
7590 } ) ;
7691} ) ;
7792
93+ /** Copy static assets (package.json, README.md) to the release package. */
7894task ( ':package:assets' , ( ) => src ( assetsGlob ) . pipe ( dest ( DIST_RELEASE ) ) ) ;
7995
96+ /** Copy the license to the release package. */
97+ task ( ':package:license' , ( ) => src ( join ( PROJECT_ROOT , 'LICENSE' ) ) . pipe ( dest ( DIST_RELEASE ) ) ) ;
98+
8099/** Copy all d.ts except the special flat typings from ngc to typings/ in the release package. */
81100task ( ':package:typings' , ( ) => {
82101 return src ( typingsGlob )
@@ -98,9 +117,11 @@ task(':package:theming', [':bundle:theming-scss'],
98117
99118/** Bundles all scss requires for theming into a single scss file in the root of the package. */
100119task ( ':bundle:theming-scss' , execNodeTask (
101- 'scss-bundle' , 'scss-bundle' , [ '-e' , themingEntryPointPath , '-d' , themingBundlePath ] , {
102- silentStdout : true
103- }
120+ 'scss-bundle' ,
121+ 'scss-bundle' , [
122+ '-e' , themingEntryPointPath ,
123+ '-d' , themingBundlePath
124+ ] , { silentStdout : true }
104125) ) ;
105126
106127/** Make sure we're logged in. */
0 commit comments