当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript lib-build-tools.sequenceTask函数代码示例

本文整理汇总了TypeScript中lib-build-tools.sequenceTask函数的典型用法代码示例。如果您正苦于以下问题:TypeScript sequenceTask函数的具体用法?TypeScript sequenceTask怎么用?TypeScript sequenceTask使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了sequenceTask函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: task

import {task} from 'gulp';
import {composeRelease, sequenceTask} from 'lib-build-tools';
import {flexLayoutPackage} from '../packages';
/**
 * Overwrite the release task for the Flex-Layout package. The Flex-Layout release
 * will include special files, like a bundled theming SCSS file or all prebuilt themes.
 */
task('flex-layout:build-release', ['flex-layout:prepare-release'], () => {
  composeRelease(flexLayoutPackage);
});

/**
 * Task that will build the Flex-Layout package. It will also copy all prebuilt themes and build
 * a bundled SCSS file for theming
 */
task('flex-layout:prepare-release', sequenceTask(
  'flex-layout:build'
));

开发者ID:marffox,项目名称:flex-layout,代码行数:18,代码来源:build-release.ts

示例2: join

import {task} from 'gulp';
import {existsSync} from 'fs';
import {execTask} from '../util/task_helpers';
import {join} from 'path';
import {buildConfig, sequenceTask} from 'lib-build-tools';

const genericName = 'angular-flex-layout.tgz';
const {outputDir, packagesDir, projectVersion} = buildConfig;
const tarName = `angular-flex-layout-${projectVersion}.tgz`;
const distDir = join(outputDir, 'releases', 'flex-layout');
const genericTar = join(distDir, genericName);
const universalAppSource = join(packagesDir, 'apps', 'universal-app');

task('universal:serve', sequenceTask(
  'prerender',
  'prerender:run:server'
));

task('prerender', sequenceTask(
  'prerender:pre',
  'prerender:build',
  'prerender:webpack')
);
task('prerender:pre', sequenceTask(
  'clean',
  'flex-layout:build-release',
  'prerender:bundle',
  'prerender:bundle:rename',
  'prerender:clean',
  'prerender:deps',
  'prerender:add:tar')
开发者ID:marffox,项目名称:flex-layout,代码行数:31,代码来源:universal.ts

示例3: join

import {existsSync} from 'fs';
import {join} from 'path';
import {buildConfig, sequenceTask} from 'lib-build-tools';
import {execTask} from '../util/task_helpers';

const {outputDir, packagesDir, projectVersion} = buildConfig;

/** Path to the demo-app source directory. */
const genericName = 'angular-flex-layout.tgz';
const demoAppSource = join(packagesDir, 'apps', 'demo-app');
const tarName = `angular-flex-layout-${projectVersion}.tgz`;
const distDir = join(outputDir, 'releases', 'flex-layout');
const genericTar = join(distDir, genericName);

/** Build the demo-app and a release to confirm that the library is AOT-compatible. */
task('aot:build', sequenceTask('aot:pre', 'aot:cli'));

task('aot:pre', sequenceTask(
  'clean',
  'flex-layout:build-release',
  'aot:bundle',
  'aot:bundle:rename',
  'aot:clean',
  'aot:deps',
  'aot:add:tar')
);

task('aot:deps', [], execTask(
  'npm', ['install'], {cwd: demoAppSource}));

开发者ID:marffox,项目名称:flex-layout,代码行数:29,代码来源:aot.ts

示例4: watchFiles

  // Custom watchers for all packages that are used inside of the demo-app. This is necessary
  // because we only want to build the changed package (using the build-no-bundles task).
   watchFiles(join(flexLayoutPackage.sourceDir, '**/!(*.scss)'), ['flex-layout:build-no-bundles']);
});

task(':serve:devapp', ['aot:pre'], execTask(
  'ng', ['serve', '--port', '5000'],
  {cwd: appDir, failOnStderr: true}
));

task('build:devapp', ['aot:pre'], execTask(
  'ng', ['build', '--prod'],
  {cwd: appDir, failOnStderr: true}
));

task('serve:devapp', sequenceTask([':serve:devapp', ':watch:devapp']));

/** Task that copies all vendors into the demo-app package. Allows hosting the app on firebase. */
task('stage-deploy:devapp', ['build:devapp'],
  () => copyFiles(join(appDir, 'dist', 'browser'), '**/*', outDir));

/**
 * Task that deploys the demo-app to Firebase. Firebase project will be the one that is
 * set for project directory using the Firebase CLI.
 */
task('deploy:devapp', ['stage-deploy:devapp'], () => {
  return firebaseTools.deploy({cwd: projectDir, only: 'hosting'})
    // Firebase tools opens a persistent websocket connection and the process will never exit.
    .then(() => { console.log('Successfully deployed the demo-app to firebase'); process.exit(0); })
    .catch((err: any) => { console.log(err); process.exit(1); });
});
开发者ID:marffox,项目名称:flex-layout,代码行数:31,代码来源:development.ts

示例5: require

import {join} from 'path';
import {task, watch} from 'gulp';
import {buildConfig, sequenceTask} from 'lib-build-tools';

// There are no type definitions available for these imports.
const runSequence = require('run-sequence');

const {packagesDir, projectDir} = buildConfig;

/** Builds everything that is necessary for karma. */
task(':test:build', sequenceTask(
  'clean',
  // Build ESM output of Flex-Layout that also includes all test files.
  'flex-layout:build-no-bundles',
));

/**
 * Runs the unit tests. Does not watch for changes.
 * This task should be used when running tests on the CI server.
 */
task('test:single-run', [':test:build'], (done: () => void) => {
  // Load karma not outside. Karma pollutes Promise with a different implementation.
  let karma = require('karma');

  new karma.Server({
    configFile: join(projectDir, 'test/karma.conf.js'),
    singleRun: true
  }, (exitCode: number) => {
    // Immediately exit the process if Karma reported errors, because due to
    // potential still running tunnel-browsers gulp won't exit properly.
    exitCode === 0 ? done() : process.exit(exitCode);
开发者ID:marffox,项目名称:flex-layout,代码行数:31,代码来源:unit-test.ts

示例6: join

import {join} from 'path';
import {green, red} from 'chalk';
import {releasePackages} from './publish';
import {sync as glob} from 'glob';
import {buildConfig, sequenceTask} from 'lib-build-tools';

/** Path to the directory where all releases are created. */
const releasesDir = join(buildConfig.outputDir, 'releases');

/** RegExp that matches Angular component inline styles that contain a sourcemap reference. */
const inlineStylesSourcemapRegex = /styles: ?\[["'].*sourceMappingURL=.*["']/;

/** RegExp that matches Angular component metadata properties that refer to external resources. */
const externalReferencesRegex = /(templateUrl|styleUrls): *["'[]/;

task('validate-release', sequenceTask(':publish:build-releases', 'validate-release:check-bundles'));

/** Task that checks the release bundles for any common mistakes before releasing to the public. */
task('validate-release:check-bundles', () => {
  const releaseFailures = releasePackages
    .map(packageName => checkReleasePackage(packageName))
    .map((failures, index) => ({failures, packageName: releasePackages[index]}));

  releaseFailures.forEach(({failures, packageName}) => {
    failures.forEach(failure => console.error(red(`Failure (${packageName}): ${failure}`)));
  });

  if (releaseFailures.some(({failures}) => failures.length > 0)) {
    // Throw an error to notify Gulp about the failures that have been detected.
    throw 'Release output is not valid and not ready for being released.';
  } else {
开发者ID:marffox,项目名称:flex-layout,代码行数:31,代码来源:validate-release.ts

示例7: minimist

/** Packages that will be published to NPM by the release task. */
export const releasePackages = [
  'flex-layout'
];

/** Regular Expression that matches valid version numbers of Angular Material. */
export const validVersionRegex = /^\d+\.\d+\.\d+(-(alpha|beta|rc)\.\d+)?$/;

/** Parse command-line arguments for release task. */
const argv = minimist(process.argv.slice(3));

task('publish', sequenceTask(
  ':publish:whoami',
  ':publish:build-releases',
  'validate-release:check-bundles',
  ':publish',
  ':publish:logout',
));

/** Task that builds all releases that will be published. */
task(':publish:build-releases', sequenceTask(
  'clean',
  releasePackages.map(packageName => `${packageName}:build-release`)
));

/** Make sure we're logged in. */
task(':publish:whoami', execTask('npm', ['whoami'], {
  silent: true,
  errMessage: 'You must be logged in to publish.'
}));
开发者ID:marffox,项目名称:flex-layout,代码行数:30,代码来源:publish.ts


注:本文中的lib-build-tools.sequenceTask函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。