Skip to content

Commit 1927814

Browse files
devversionjelbourn
authored andcommitted
chore: add license header to umd bundles (#2348)
* chore: add license header to umd bundles * Adds a license header to the UMD bundles. Similar to @angular core packages. * Link to material.angular.io page
1 parent fcc83ad commit 1927814

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

tools/gulp/constants.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import {join} from 'path';
22

3+
export const MATERIAL_VERSION = require('../../package.json').version;
4+
35
export const PROJECT_ROOT = join(__dirname, '../..');
46
export const SOURCE_ROOT = join(PROJECT_ROOT, 'src');
57

@@ -22,6 +24,12 @@ export const HTML_MINIFIER_OPTIONS = {
2224
removeAttributeQuotes: false
2325
};
2426

27+
export const LICENSE_BANNER = `/**
28+
* @license Angular Material v${MATERIAL_VERSION}
29+
* Copyright (c) 2016 Google, Inc. https://material.angular.io/
30+
* License: MIT
31+
*/`;
32+
2533
export const NPM_VENDOR_FILES = [
2634
'@angular', 'core-js/client', 'hammerjs', 'rxjs', 'systemjs/dist', 'zone.js/dist'
2735
];

tools/gulp/tasks/components.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {task, watch, src, dest} from 'gulp';
22
import * as path from 'path';
33

44
import {
5-
DIST_COMPONENTS_ROOT, PROJECT_ROOT, COMPONENTS_DIR, HTML_MINIFIER_OPTIONS
5+
DIST_COMPONENTS_ROOT, PROJECT_ROOT, COMPONENTS_DIR, HTML_MINIFIER_OPTIONS, LICENSE_BANNER
66
} from '../constants';
77
import {sassBuildTask, tsBuildTask, execNodeTask, copyTask, sequenceTask} from '../task_helpers';
88

@@ -95,6 +95,7 @@ task(':build:components:rollup', () => {
9595
moduleName: 'ng.material',
9696
format: 'umd',
9797
globals,
98+
banner: LICENSE_BANNER,
9899
dest: 'material.umd.js'
99100
};
100101

0 commit comments

Comments
 (0)