當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript del.sync函數代碼示例

本文整理匯總了TypeScript中del.sync函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript sync函數的具體用法?TypeScript sync怎麽用?TypeScript sync使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了sync函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: close

 public close(): void {
     if (this.configurationDirPath && fs.existsSync(this.configurationDirPath)) {
         del.sync(this.configurationDirPath, {force: true});
     }
     if (this.certsDir && fs.existsSync(this.certsDir)) {
         del.sync(this.certsDir);
     }
 }
開發者ID:shubham90,項目名稱:vsts-tasks,代碼行數:8,代碼來源:containerconnection.ts

示例2: cleanSync

function cleanSync(deleteVsix: boolean) {
    del.sync('install.*');
    del.sync('.omnisharp*');
    del.sync('.debugger');

    if (deleteVsix) {
        del.sync('*.vsix');
    }
}
開發者ID:peterblazejewicz,項目名稱:omnisharp-vscode,代碼行數:9,代碼來源:offlinePackagingTasks.ts

示例3: close

 public close(multipleLoginSupported?: boolean, command?: string): void {
     if (multipleLoginSupported) {
         if (this.isLogoutRequired(command)) {
             this.logout();
         }
     }
     else {
         if (this.configurationDirPath && fs.existsSync(this.configurationDirPath)) {
             del.sync(this.configurationDirPath, {force: true});
         }
         if (this.certsDir && fs.existsSync(this.certsDir)) {
             del.sync(this.certsDir);
         }
     }
 }
開發者ID:Microsoft,項目名稱:vsts-tasks,代碼行數:15,代碼來源:containerconnection.ts

示例4: loadResourceFile

 .map(path => {
   const styleContent = loadResourceFile(path);
   if (deleteResource === true) {
     del.sync(path);
   }
   return styleContent;
 });
開發者ID:shlomiassaf,項目名稱:ng2-chess,代碼行數:7,代碼來源:inline-resources.ts

示例5: unsetDockerConfigEnvVariable

 public unsetDockerConfigEnvVariable() {
     var dockerConfigPath = tl.getVariable("DOCKER_CONFIG");
     if (dockerConfigPath) {
         tl.setVariable("DOCKER_CONFIG", "");
         del.sync(dockerConfigPath, {force: true});
     }    
 }
開發者ID:shubham90,項目名稱:vsts-tasks,代碼行數:7,代碼來源:containerconnection.ts

示例6: removeConfigDirAndUnsetEnvVariable

 private removeConfigDirAndUnsetEnvVariable(): void {
     let dockerConfigDirPath = tl.getVariable("DOCKER_CONFIG");
     if (dockerConfigDirPath && this.isPathInTempDirectory(dockerConfigDirPath) && fs.existsSync(dockerConfigDirPath)) {
         tl.debug(tl.loc('DeletingDockerConfigDirectory', dockerConfigDirPath));
         del.sync(dockerConfigDirPath, {force: true});
     }
     
     this.unsetEnvironmentVariable();
 }
開發者ID:Microsoft,項目名稱:vsts-tasks,代碼行數:9,代碼來源:containerconnection.ts

示例7: getPackageJSON

gulp.task('vsix:release:unpackage', () => {
    const packageJSON = getPackageJSON();
    const name = packageJSON.name;
    const version = packageJSON.version;
    const packageName = `${name}-${version}.vsix`;

    del.sync(unpackedVsixPath);
    fs.createReadStream(packageName).pipe(unzip.Extract({ path: unpackedVsixPath }));
});
開發者ID:peterblazejewicz,項目名稱:omnisharp-vscode,代碼行數:9,代碼來源:onlinePackagingTasks.ts

示例8: callback

 callback(file, (done: () => void) => {
     try {
         del.sync(dir, { force: true });
         console.log(`delete ${dir}`);
         done();
     } catch (error) {
         console.error(error);
     }
 });
開發者ID:defvar,項目名稱:toyctron,代碼行數:9,代碼來源:tempFile.ts

示例9: join

  return fileContent.replace(/templateUrl:\s*'([^']+?\.html)'/g, (_match, templateUrl) => {
    const templatePath = join(dirname(filePath), templateUrl);
    const templateContent = loadResourceFile(templatePath);

    if (deleteResource === true) {
      del.sync(templatePath);
    }

    return `template: "${templateContent}"`;
  });
開發者ID:shlomiassaf,項目名稱:ng2-chess,代碼行數:10,代碼來源:inline-resources.ts

示例10: Promise

      .then( () => {
        const p = util.root(util.currentPackage().tsConfigObj.compilerOptions.outDir);
        del.sync(p);

        const tsConfig = jsonfile.readFileSync(util.root(util.FS_REF.TS_CONFIG_TMP));
        tsConfig.compilerOptions.target = 'es5';
        jsonfile.writeFileSync(util.root(util.FS_REF.TS_CONFIG_TMP), tsConfig, {spaces: 2});

        return new Promise( (resolve, reject) => webpack(config).run((err, stats) => err ? reject(err) : resolve(stats)) );
      })
開發者ID:shlomiassaf,項目名稱:ng2-chess,代碼行數:10,代碼來源:build.ts


注:本文中的del.sync函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。