Skip to content

Commit

Permalink
chore: copy LICENSE to release package (angular#3957)
Browse files Browse the repository at this point in the history
  • Loading branch information
jelbourn authored Apr 7, 2017
1 parent 94320c4 commit 3819cc6
Showing 1 changed file with 29 additions and 8 deletions.
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

0 comments on commit 3819cc6

Please sign in to comment.