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


TypeScript glob-promise.sync函数代码示例

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


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

示例1: suiteSetup

 suiteSetup(() => {
     chai.should();
     tmpDir = tmp.dirSync();
     let args: string[] = [];
     args.push(path.join("node_modules", "gulp", "bin", "gulp.js"));
     args.push("package:offline");
     args.push("--retainVsix");// do not delete the existing vsix in the repo
     args.push(`-o`);
     args.push(tmpDir.name);
     invokeNode(args);
     vsixFiles = glob.sync(path.join(tmpDir.name, '*.vsix'));
 });
开发者ID:peterblazejewicz,项目名称:omnisharp-vscode,代码行数:12,代码来源:offlinePackage.test.ts

示例2: loadFiles

function loadFiles(projectRoot: string, modelsDir: string): string[] {
  // this should be in options
  return glob.sync(path.resolve(projectRoot, modelsDir));
}
开发者ID:xanthous-tech,项目名称:loopback-4-typeorm,代码行数:4,代码来源:repository-booter.mixin.ts

示例3: loadRepoFiles

function loadRepoFiles(projectRoot: string): string[] {
  // this should be in options
  return glob.sync(projectRoot + '/repositories/*.repository.js');
}
开发者ID:xanthous-tech,项目名称:loopback-4-typeorm,代码行数:4,代码来源:repository-booter.mixin.ts

示例4: suite

/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import * as chai from 'chai';
import * as fs from 'async-file';
import * as glob from 'glob-promise';
import * as path from 'path';

let vsixFiles = glob.sync(path.join(process.cwd(), '**', '*.vsix'));

suite("Omnisharp-Vscode VSIX", async () => {
    suiteSetup(async () => {
        chai.should();

    });

    test("At least one vsix file should be produced", () => {
        vsixFiles.length.should.be.greaterThan(0, "the build should produce at least one vsix file");
    });

    vsixFiles.forEach(element => {
        const sizeInMB = 5;
        const maximumVsixSizeInBytes = sizeInMB * 1024 * 1024;

        suite(`Given ${element}`, () => {
            test(`Then its size is less than ${sizeInMB}MB`, async () => {
                const stats = await fs.stat(element);
                stats.size.should.be.lessThan(maximumVsixSizeInBytes);
            });
开发者ID:eamodio,项目名称:omnisharp-vscode,代码行数:31,代码来源:vsix.test.ts


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