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


TypeScript broccoli-file-creator.default函数代码示例

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


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

示例1: Funnel

module.exports = function makeNodeTree(projects: string[], destinationPath: string) {
  // list of npm packages that this build will create
  var outputPackages = ['angular2', 'benchpress'];

  let srcTree = new Funnel('modules', {
    include: ['angular2/**'],
    exclude: [
      '**/e2e_test/**',
      'angular2/test/**',
      'angular2/examples/**',

      'angular2/src/testing/**',
      'angular2/testing.ts',
      'angular2/testing_internal.ts',
      'angular2/src/upgrade/**',
      'angular2/upgrade.ts',
      'angular2/platform/testing/**',
      'angular2/manual_typings/**',
      'angular2/typings/**'
    ]
  });

  let externalTypings = [
    'angular2/typings/hammerjs/hammerjs.d.ts',
    'angular2/typings/node/node.d.ts',
    'angular2/manual_typings/globals.d.ts',
    'angular2/typings/es6-collections/es6-collections.d.ts',
    'angular2/typings/es6-promise/es6-promise.d.ts'
  ];

  let externalTypingsTree = new Funnel('modules', {files: externalTypings});

  let packageTypings =
      new Funnel('node_modules', {include: ['rxjs/**/*.d.ts', 'zone.js/**/*.d.ts']});

  let compileSrcContext = mergeTrees([srcTree, externalTypingsTree, packageTypings]);

  // Compile the sources and generate the @internal .d.ts
  let compiledSrcTreeWithInternals = compileTree(compileSrcContext, true, []);

  var testTree = new Funnel('modules', {
    include: [
      'angular2/manual_typings/**',
      'angular2/typings/**',

      'angular2/test/**',
      'benchpress/**',
      '**/e2e_test/**',
      'angular2/examples/**/*_spec.ts',

      'angular2/src/testing/**',
      'angular2/testing.ts',
      'angular2/testing_internal.ts',
      'angular2/src/upgrade/**',
      'angular2/upgrade.ts',
      'angular2/platform/testing/**',
    ],
    exclude: [
      // the following code and tests are not compatible with CJS/node environment
      'angular2/test/animate/**',
      'angular2/test/core/zone/**',
      'angular2/test/testing/fake_async_spec.ts',
      'angular2/test/testing/testing_public_browser_spec.ts',
      'angular2/test/platform/xhr_impl_spec.ts',
      'angular2/test/platform/browser/**/*.ts',
      'angular2/test/common/forms/**',
      'angular2/manual_typings/**',
      'angular2/typings/**',

      // we call browser's bootstrap
      'angular2/test/router/route_config/route_config_spec.ts',
      'angular2/test/router/integration/bootstrap_spec.ts',

      // we check the public api by importing angular2/angular2
      'angular2/test/symbol_inspector/**/*.ts',
      'angular2/test/public_api_spec.ts',

      'angular2/test/web_workers/worker/renderer_integration_spec.ts',

      'angular2/test/upgrade/**/*.ts',
      'angular1_router/**',
      'payload_tests/**'
    ]
  });

  // Compile the tests against the src @internal .d.ts
  let srcPrivateDeclarations =
      new Funnel(compiledSrcTreeWithInternals, {srcDir: INTERNAL_TYPINGS_PATH});

  let testAmbients = [
    'angular2/typings/jasmine/jasmine.d.ts',
    'angular2/typings/angular-protractor/angular-protractor.d.ts',
    'angular2/typings/selenium-webdriver/selenium-webdriver.d.ts'
  ];
  let testAmbientsTree = new Funnel('modules', {files: testAmbients});

  testTree = mergeTrees(
      [testTree, srcPrivateDeclarations, testAmbientsTree, externalTypingsTree, packageTypings]);

  let compiledTestTree = compileTree(testTree, false, []);
//.........这里部分代码省略.........
开发者ID:KarthiTrichy20,项目名称:angular,代码行数:101,代码来源:node_tree.ts

示例2: Funnel

module.exports = function makeNodeTree(projects, destinationPath) {
  // list of npm packages that this build will create
  var outputPackages = ['angular2', 'benchpress'];

  let srcTree = new Funnel('modules', {
    include: ['angular2/**'],
    exclude: [
      '**/e2e_test/**',
      'angular2/test/**',
      'angular2/examples/**',

      'angular2/src/testing/**',
      'angular2/testing.ts',
      'angular2/testing_internal.ts',
      'angular2/src/upgrade/**',
      'angular2/upgrade.ts',
      'angular2/platform/testing/**',
    ]
  });

  let ambientTypings = [
    'angular2/typings/hammerjs/hammerjs.d.ts',
    'angular2/typings/node/node.d.ts',
    'angular2/manual_typings/globals.d.ts',
    'angular2/typings/es6-collections/es6-collections.d.ts',
    'angular2/typings/es6-promise/es6-promise.d.ts'
  ];

  // Compile the sources and generate the @internal .d.ts
  let compiledSrcTreeWithInternals = compileTree(srcTree, true, ambientTypings);

  var testTree = new Funnel('modules', {
    include: [
      'angular2/manual_typings/**',
      'angular2/typings/**',

      'angular2/test/**',
      'benchpress/**',
      '**/e2e_test/**',
      'angular2/examples/**/*_spec.ts',

      'angular2/src/testing/**',
      'angular2/testing.ts',
      'angular2/testing_internal.ts',
      'angular2/src/upgrade/**',
      'angular2/upgrade.ts',
      'angular2/platform/testing/**',
    ],
    exclude: [
      // the following code and tests are not compatible with CJS/node environment
      'angular2/test/animate/**',
      'angular2/test/core/zone/**',
      'angular2/test/testing/fake_async_spec.ts',
      'angular2/test/testing/testing_public_spec.ts',
      'angular2/test/platform/xhr_impl_spec.ts',
      'angular2/test/platform/browser/**/*.ts',
      'angular2/test/common/forms/**',

      // we call browser's bootstrap
      'angular2/test/router/route_config_spec.ts',
      'angular2/test/router/integration/bootstrap_spec.ts',

      // we check the public api by importing angular2/angular2
      'angular2/test/symbol_inspector/**/*.ts',
      'angular2/test/public_api_spec.ts',

      'angular2/test/web_workers/worker/renderer_integration_spec.ts',

      'angular2/test/upgrade/**/*.ts',
      'angular1_router/**',
      'payload_tests/**'
    ]
  });

  // Compile the tests against the src @internal .d.ts
  let srcPrivateDeclarations =
      new Funnel(compiledSrcTreeWithInternals, {srcDir: INTERNAL_TYPINGS_PATH});

  testTree = mergeTrees([testTree, srcPrivateDeclarations]);

  let compiledTestTree = compileTree(testTree, false, ambientTypings.concat([
    'angular2/typings/jasmine/jasmine.d.ts',
    'angular2/typings/angular-protractor/angular-protractor.d.ts',
  ]));

  // Merge the compiled sources and tests
  let compiledSrcTree =
      new Funnel(compiledSrcTreeWithInternals, {exclude: [`${INTERNAL_TYPINGS_PATH}/**`]});

  let compiledTree = mergeTrees([compiledSrcTree, compiledTestTree]);

  // Now we add the LICENSE file into all the folders that will become npm packages
  outputPackages.forEach(function(destDir) {
    var license = new Funnel('.', {files: ['LICENSE'], destDir: destDir});
    // merge the test tree
    compiledTree = mergeTrees([compiledTree, license]);
  });

  // Get all docs and related assets and prepare them for js build
  var srcDocs = extractDocs(srcTree);
//.........这里部分代码省略.........
开发者ID:Ashok-Pal,项目名称:angular,代码行数:101,代码来源:node_tree.ts


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