本文整理匯總了TypeScript中gulp-zip.default函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript default函數的具體用法?TypeScript default怎麽用?TypeScript default使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了default函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: archiveFolder
export async function archiveFolder(webAppFolder:string) {
var deferred = Q.defer<string>();
var defaultWorkingDirectory = tl.getVariable('System.DefaultWorkingDirectory');
var tempPackageName = 'temp_web_app_package.zip';
await gulp.src(path.join(webAppFolder, '**', '*'))
.pipe(zip(tempPackageName))
.pipe(gulp.dest(defaultWorkingDirectory)).on('end',function(error){
if(error){
throw new Error(error)
}
deferred.resolve(path.join(defaultWorkingDirectory, tempPackageName));
});
return deferred.promise;
}
示例2:
export = () => {
gulp.src('./target/**/*')
.pipe(zip(packageInfo.name + '.jar'))
.pipe(maven.install({
'groupId': argv['groupId'] || 'com.github.mapkiwiz',
'artifactId': packageInfo.name,
'version': argv['version'] || packageInfo.version
})
);
}
示例3: Promise
return new Promise((resolve, reject) => {
gulp.src(path.join(source, '**', '*'))
.pipe(zip(path.basename(target)))
.pipe(gulp.dest(path.dirname(target))).on('end', function(error){
error ? reject(tl.loc("zipFailed", error)) : resolve("");
})});
示例4: function
], function () {
return gulp.src(`dist/${buildName}/mainnet/min/**/*.*`)
.pipe(zip(`${pack.name}-${buildName}-v${pack.version}.zip`))
.pipe(gulp.dest('dist'));
});