Skip to content

chore: add license header to umd bundles #2348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tools/gulp/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import {join} from 'path';

export const MATERIAL_VERSION = require('../../package.json').version;

export const PROJECT_ROOT = join(__dirname, '../..');
export const SOURCE_ROOT = join(PROJECT_ROOT, 'src');

Expand All @@ -22,6 +24,12 @@ export const HTML_MINIFIER_OPTIONS = {
removeAttributeQuotes: false
};

export const LICENSE_BANNER = `/**
* @license Angular Material v${MATERIAL_VERSION}
* Copyright (c) 2016 Google, Inc. https://material.angular.io/
* License: MIT
*/`;

export const NPM_VENDOR_FILES = [
'@angular', 'core-js/client', 'hammerjs', 'rxjs', 'systemjs/dist', 'zone.js/dist'
];
Expand Down
3 changes: 2 additions & 1 deletion tools/gulp/tasks/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {task, watch, src, dest} from 'gulp';
import * as path from 'path';

import {
DIST_COMPONENTS_ROOT, PROJECT_ROOT, COMPONENTS_DIR, HTML_MINIFIER_OPTIONS
DIST_COMPONENTS_ROOT, PROJECT_ROOT, COMPONENTS_DIR, HTML_MINIFIER_OPTIONS, LICENSE_BANNER
} from '../constants';
import {sassBuildTask, tsBuildTask, execNodeTask, copyTask, sequenceTask} from '../task_helpers';

Expand Down Expand Up @@ -95,6 +95,7 @@ task(':build:components:rollup', () => {
moduleName: 'ng.material',
format: 'umd',
globals,
banner: LICENSE_BANNER,
dest: 'material.umd.js'
};

Expand Down