Skip to content
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

chore: copy LICENSE to release package #3957

Merged
merged 1 commit into from
Apr 7, 2017
Merged
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
37 changes: 29 additions & 8 deletions tools/gulp/tasks/release.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import {spawn} from 'child_process';
import {existsSync, statSync, writeFileSync, readFileSync} from 'fs-extra';
import {join, basename} from 'path';
import {task, src, dest} from 'gulp';
import {existsSync, readFileSync, statSync, writeFileSync} from 'fs-extra';
import {basename, join} from 'path';
import {dest, src, task} from 'gulp';
import {execNodeTask, execTask, sequenceTask} from '../util/task_helpers';
import {
DIST_RELEASE, DIST_BUNDLES, DIST_MATERIAL, COMPONENTS_DIR, LICENSE_BANNER, DIST_ROOT
COMPONENTS_DIR,
DIST_BUNDLES,
DIST_MATERIAL,
DIST_RELEASE,
DIST_ROOT,
LICENSE_BANNER,
PROJECT_ROOT,
} from '../constants';
import * as minimist from 'minimist';

Expand Down Expand Up @@ -40,7 +46,16 @@ task('build:release', sequenceTask(

/** Task that combines intermediate build artifacts into the release package structure. */
task(':package:release', sequenceTask(
[':package:typings', ':package:umd', ':package:fesm', ':package:assets', ':package:theming'],
// Run in parallel
[
':package:typings',
':package:umd',
':package:fesm',
':package:assets',
':package:theming',
':package:license'
],
// Run in sequence
':inline-metadata-resources',
':package:metadata',
));
Expand Down Expand Up @@ -75,8 +90,12 @@ task(':inline-metadata-resources', () => {
});
});

/** Copy static assets (package.json, README.md) to the release package. */
task(':package:assets', () => src(assetsGlob).pipe(dest(DIST_RELEASE)));

/** Copy the license to the release package. */
task(':package:license', () => src(join(PROJECT_ROOT, 'LICENSE')).pipe(dest(DIST_RELEASE)));

/** Copy all d.ts except the special flat typings from ngc to typings/ in the release package. */
task(':package:typings', () => {
return src(typingsGlob)
Expand All @@ -98,9 +117,11 @@ task(':package:theming', [':bundle:theming-scss'],

/** Bundles all scss requires for theming into a single scss file in the root of the package. */
task(':bundle:theming-scss', execNodeTask(
'scss-bundle', 'scss-bundle', ['-e', themingEntryPointPath, '-d', themingBundlePath], {
silentStdout: true
}
'scss-bundle',
'scss-bundle', [
'-e', themingEntryPointPath,
'-d', themingBundlePath
], {silentStdout: true}
));

/** Make sure we're logged in. */
Expand Down