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


TypeScript tmp.dirSync函数代码示例

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


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

示例1: async

      async () => {
        const tmpDir = tmp.dirSync();
        copyDir(path.join(fixturePath, 'element-with-other-deps'), tmpDir.name);

        await runCommand(binPath, ['build', '--component-dir=path/to/deps/'], {
          cwd: tmpDir.name
        });
      });
开发者ID:abdonrd,项目名称:polymer-cli,代码行数:8,代码来源:build_test.ts

示例2: test

  test('handles polymer 2.x project bundler defaults', async () => {
    const tmpDir = tmp.dirSync();
    copyDir(path.join(fixturePath, 'polymer-2-project', 'source'), tmpDir.name);

    await runCommand(binPath, ['build', '--bundle'], {cwd: tmpDir.name});
    assertDirsEqual(
        path.join(tmpDir.name, 'build/default'),
        path.join(fixturePath, 'polymer-2-project', 'expected/default'));
  });
开发者ID:asdfg9822,项目名称:polymer-cli,代码行数:9,代码来源:build_test.ts

示例3: test

  test('moduleResolution node rewrites module names to paths', async () => {
    const tmpDir = tmp.dirSync();
    copyDir(path.join(fixturePath, 'build-modules', 'source'), tmpDir.name);

    await runCommand(binPath, ['build'], {cwd: tmpDir.name});
    assertDirsEqual(
        path.join(tmpDir.name, 'build'),
        path.join(fixturePath, 'build-modules', 'expected'));
  });
开发者ID:abdonrd,项目名称:polymer-cli,代码行数:9,代码来源:build_test.ts

示例4: test

  test('module-based project builds with various configs', async () => {
    const tmpDir = tmp.dirSync();
    copyDir(path.join(fixtureDir, 'build-modules', 'source'), tmpDir.name);

    await runCommand(binPath, ['build'], {cwd: tmpDir.name});
    assertDirsEqual(
        path.join(tmpDir.name, 'build'),
        path.join(fixtureDir, 'build-modules', 'expected'));
  });
开发者ID:poehlmann,项目名称:EvaluacionDiferencialDeLaMemoria,代码行数:9,代码来源:build_test.ts

示例5: beforeEach

 beforeEach(() => {
   base1 = tmp.dirSync()
   mkdirp.sync(path.join(base1.name, 'a/b/c/node_modules/hello'))
   mkdirp.sync(path.join(base1.name, 'a/b/c/node_production_modules/hello/src'))
   fs.writeFileSync(path.join(base1.name, 'a/b/c/index.js'), fileContent('abc index'))
   fs.writeFileSync(path.join(base1.name, 'a/b/c.js'), fileContent('c js'))
   fs.writeFileSync(path.join(base1.name, 'a/b/c/node_modules/hello/index.js'), fileContent('hello index'))
   fs.writeFileSync(path.join(base1.name, 'a/b/c/node_production_modules/hello/package.json'), pkgJson)
   fs.writeFileSync(path.join(base1.name, 'a/b/c/node_production_modules/hello/src/main.js'), fileContent('hello pkg'))
 })
开发者ID:alexsandrocruz,项目名称:botpress,代码行数:10,代码来源:require.test.ts

示例6: 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


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