當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。