• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript broccoli-merge-trees.default函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: destCopy

module.exports = function makeDartTree(destinationPath) {
  var sourceTree = mergeTrees([getSourceTree(), getHtmlSourcesTree()]);
  sourceTree = fixDartFolderLayout(sourceTree);

  var dartTree = mergeTrees([sourceTree, getTemplatedPubspecsTree(), getDocsTree()]);

  return destCopy(dartTree, destinationPath);
};
开发者ID:Crhauc01,项目名称:Angular2Repo,代码行数:8,代码来源:dart_tree.ts


示例2: makeDartTree

module.exports = function makeDartTree() {
  var sourceTree = mergeTrees([getSourceTree(), getHtmlSourcesTree()]);
  sourceTree = fixDartFolderLayout(sourceTree);

  var mergedResult = mergeTrees([sourceTree, getTemplatedPubspecsTree(), getDocsTree()]);

  // Move the tree under the 'dart' folder.
  return stew.mv(mergedResult, 'dart');
};
开发者ID:Alexandre-Herve,项目名称:angular,代码行数:9,代码来源:dart_tree.ts


示例3: destCopy

module.exports = function makeDartTree(options: AngularBuilderOptions) {
  var dartSources = dartfmt(getSourceTree(), {dartSDK: options.dartSDK, logs: options.logs});
  var sourceTree = mergeTrees([dartSources, getHtmlSourcesTree()]);
  sourceTree = fixDartFolderLayout(sourceTree);

  var dartTree = mergeTrees([sourceTree, getTemplatedPubspecsTree(), getDocsTree()]);

  return destCopy(dartTree, options.outputPath);
};
开发者ID:PerShing2014,项目名称:angular,代码行数:9,代码来源:dart_tree.ts


示例4: destCopy

module.exports = function makeDartTree(destinationPath) {
  var sourceTree = mergeTrees([getSourceTree(), getHtmlSourcesTree()]);
  sourceTree = fixDartFolderLayout(sourceTree);

  var dartTree = mergeTrees([sourceTree, getTemplatedPubspecsTree(), getDocsTree()]);

  // TODO(iminar): tree differ seems to have issues with trees created by mergeTrees, investigate!
  //   ENOENT error is thrown while doing fs.readdirSync on inputRoot
  //   in the meantime, we just do noop mv to create a new tree
  dartTree = stew.mv(dartTree, '');

  return destCopy(dartTree, destinationPath);
};
开发者ID:cstkevin,项目名称:angular,代码行数:13,代码来源:dart_tree.ts


示例5: getSourceTree

function getSourceTree() {
  // Transpile everything in 'modules' except for rtts_assertions.
  var tsInputTree = modulesFunnel(['**/*.js', '**/*.ts', '**/*.dart'], ['rtts_assert/**/*']);
  var transpiled = ts2dart.transpile(tsInputTree);
  // Native sources, dart only examples, etc.
  var dartSrcs = modulesFunnel(['**/*.dart']);
  return mergeTrees([transpiled, dartSrcs]);
}
开发者ID:Alexandre-Herve,项目名称:angular,代码行数:8,代码来源:dart_tree.ts


示例6: getSourceTree

function getSourceTree() {
  // Transpile everything in 'modules' except for rtts_assertions.
  var tsInputTree = modulesFunnel(['**/*.js', '**/*.ts', '**/*.dart'], ['rtts_assert/**/*']);
  var transpiled = ts2dart(tsInputTree, {generateLibraryName: true, generateSourceMap: false});
  // Native sources, dart only examples, etc.
  var dartSrcs = modulesFunnel(['**/*.dart', '**/*.ng_meta.json', '**/css/**']);
  return mergeTrees([transpiled, dartSrcs]);
}
开发者ID:PerShing2014,项目名称:angular,代码行数:8,代码来源:dart_tree.ts


示例7: getHtmlSourcesTree

function getHtmlSourcesTree() {
  // Replace $SCRIPT$ markers in HTML files.
  var htmlSrcsTree = stew.map(modulesFunnel(['*/src/**/*.html']), replaceScriptTagInHtml);
  // Copy a url_params_to_form.js for each benchmark html file.
  var urlParamsToFormTree = new MultiCopy('', {
    srcPath: 'tools/build/snippets/url_params_to_form.js',
    targetPatterns: ['modules/benchmarks*/src/*', 'modules/benchmarks*/src/*/*'],
  });
  urlParamsToFormTree = stew.rename(urlParamsToFormTree, stripModulePrefix);
  return mergeTrees([htmlSrcsTree, urlParamsToFormTree]);
}
开发者ID:Alexandre-Herve,项目名称:angular,代码行数:11,代码来源:dart_tree.ts


示例8: getDocsTree

function getDocsTree() {
  // LICENSE files
  var licenses = new MultiCopy('', {
    srcPath: 'LICENSE',
    targetPatterns: ['modules/*'],
    exclude: ['*/rtts_assert'],  // Not in dart.
  });
  licenses = stew.rename(licenses, stripModulePrefix);

  // Documentation.
  // Rename *.dart.md -> *.dart.
  var mdTree = stew.rename(modulesFunnel(['**/*.dart.md']),
                           relativePath => relativePath.replace(/\.dart\.md$/, '.md'));
  // Copy all assets, ignore .js. and .dart. (handled above).
  var docs = modulesFunnel(['**/*.md', '**/*.png', '**/*.html', '**/*.css', '**/*.scss'],
                           ['**/*.js.md', '**/*.dart.md']);
  return mergeTrees([licenses, mdTree, docs]);
}
开发者ID:Alexandre-Herve,项目名称:angular,代码行数:18,代码来源:dart_tree.ts


示例9: Funnel

 outputPackages.forEach(function(destDir) {
   var license = new Funnel('.', {files: ['LICENSE'], destDir: destDir});
   nodeTree = mergeTrees([nodeTree, license]);
 });
开发者ID:SnackyPete,项目名称:angular,代码行数:4,代码来源:node_tree.ts


示例10: destCopy

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

  var modulesTree = new Funnel('modules', {
    include: ['angular2/**', 'benchpress/**', 'rtts_assert/**', '**/e2e_test/**'],
    exclude: [
      // the following code and tests are not compatible with CJS/node environment
      'angular2/test/core/zone/**',
      'angular2/test/test_lib/fake_async_spec.ts',
      'angular2/test/services/xhr_impl_spec.ts',
      'angular2/test/forms/**'
    ]
  });

  var nodeTree = transpileWithTraceur(modulesTree, {
    destExtension: '.js',
    destSourceMapExtension: '.map',
    traceurOptions: {
      sourceMaps: true,
      annotations: true,      // parse annotations
      types: true,            // parse types
      script: false,          // parse as a module
      memberVariables: true,  // parse class fields
      typeAssertionModule: 'rtts_assert/rtts_assert',
      // Don't use type assertions since this is partly transpiled by typescript
      typeAssertions: false,
      modules: 'commonjs'
    }
  });

  // 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});
    nodeTree = mergeTrees([nodeTree, license]);
  });

  // Get all docs and related assets and prepare them for js build
  var docs = new Funnel(modulesTree, {include: ['**/*.md', '**/*.png'], exclude: ['**/*.dart.md']});
  docs = stew.rename(docs, 'README.js.md', 'README.md');

  // Generate shared package.json info
  var BASE_PACKAGE_JSON = require(path.join(projectRootDir, 'package.json'));
  var COMMON_PACKAGE_JSON = {
    version: BASE_PACKAGE_JSON.version,
    homepage: BASE_PACKAGE_JSON.homepage,
    bugs: BASE_PACKAGE_JSON.bugs,
    license: BASE_PACKAGE_JSON.license,
    contributors: BASE_PACKAGE_JSON.contributors,
    dependencies: BASE_PACKAGE_JSON.dependencies,
    devDependencies: {
      "yargs": BASE_PACKAGE_JSON.devDependencies['yargs'],
      "gulp-sourcemaps": BASE_PACKAGE_JSON.devDependencies['gulp-sourcemaps'],
      "gulp-traceur": BASE_PACKAGE_JSON.devDependencies['gulp-traceur'],
      "gulp": BASE_PACKAGE_JSON.devDependencies['gulp'],
      "gulp-rename": BASE_PACKAGE_JSON.devDependencies['gulp-rename'],
      "through2": BASE_PACKAGE_JSON.devDependencies['through2']
    }
  };

  // Add a .template extension since renderLodashTemplate strips one extension
  var packageJsons = stew.rename(new Funnel(modulesTree, {include: ['**/package.json']}), '.json',
                                 '.json.template');
  packageJsons = renderLodashTemplate(
      packageJsons, {files: ["**/**"], context: {'packageJson': COMMON_PACKAGE_JSON}});

  // HACK: workaround for Traceur behavior.
  // It expects all transpiled modules to contain this marker.
  // TODO: remove this when we no longer use traceur
  var traceurCompatibleTsModulesTree = replace(modulesTree, {
    files: ['**/*.ts'],
    patterns: [{
      // Empty replacement needed so that replaceWithPath gets triggered...
      match: /$/g,
      replacement: ""
    }],
    replaceWithPath: function(path, content) {
      if (!path.endsWith('.d.ts')) {
        content += '\r\nexport var __esModule = true;\n';
      }
      return content;
    }
  });

  var typescriptTree = compileWithTypescript(traceurCompatibleTsModulesTree, {
    allowNonTsExtensions: false,
    emitDecoratorMetadata: true,
    declaration: true,
    mapRoot: '', /* force sourcemaps to use relative path */
    module: 'commonjs',
    noEmitOnError: true,
    rootDir: '.',
    rootFilePaths: ['angular2/traceur-runtime.d.ts', 'angular2/globals.d.ts'],
    sourceMap: true,
    sourceRoot: '.',
    target: 'ES5'
  });

  nodeTree = mergeTrees([nodeTree, typescriptTree, docs, packageJsons]);

//.........这里部分代码省略.........
开发者ID:SnackyPete,项目名称:angular,代码行数:101,代码来源:node_tree.ts



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript broccoli-replace.default函数代码示例发布时间:2022-05-25
下一篇:
TypeScript broccoli-lodash.default函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap