Skip to content

Commit 3819cc6

Browse files
authored
chore: copy LICENSE to release package (#3957)
1 parent 94320c4 commit 3819cc6

File tree

1 file changed

+29
-8
lines changed

1 file changed

+29
-8
lines changed

tools/gulp/tasks/release.ts

+29-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import {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';
55
import {execNodeTask, execTask, sequenceTask} from '../util/task_helpers';
66
import {
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';
915
import * 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. */
4248
task(':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. */
7894
task(':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. */
81100
task(':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. */
100119
task(':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

Comments
 (0)