本文整理汇总了TypeScript中webdeployment-common/fileTransformationsUtility.js.default.advancedFileTransformations方法的典型用法代码示例。如果您正苦于以下问题:TypeScript js.default.advancedFileTransformations方法的具体用法?TypeScript js.default.advancedFileTransformations怎么用?TypeScript js.default.advancedFileTransformations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webdeployment-common/fileTransformationsUtility.js.default
的用法示例。
在下文中一共展示了js.default.advancedFileTransformations方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: main
async function main() {
tl.setResourcePath(path.join( __dirname, 'task.json'));
let webPackage = new Package(tl.getPathInput('folderPath', true));
let packagePath = webPackage.getPath();
let fileType = tl.getInput("fileType", false);
let targetFiles = tl.getDelimitedInput('targetFiles', '\n', false);
let xmlTransformation = tl.getBoolInput('enableXmlTransform', false);
let xmlTransformationRules = tl.getDelimitedInput('xmlTransformationRules', '\n', false);
let applyFileTransformFlag = fileType || xmlTransformation;
if (applyFileTransformFlag) {
let isFolderBasedDeployment: boolean = tl.stats(packagePath).isDirectory();
if(!isFolderBasedDeployment) {
var folderPath = await deployUtility.generateTemporaryFolderForDeployment(isFolderBasedDeployment, packagePath, webPackage.getPackageType());
fileTransformationsUtility.advancedFileTransformations(isFolderBasedDeployment, targetFiles, xmlTransformation, fileType, folderPath, xmlTransformationRules);
await zipUtility.archiveFolder(folderPath, path.dirname(packagePath), path.basename(packagePath));
}
else {
fileTransformationsUtility.advancedFileTransformations(isFolderBasedDeployment, targetFiles, xmlTransformation, fileType, packagePath, xmlTransformationRules);
}
}
else {
tl.debug('File Tranformation not enabled');
}
}