本文整理汇总了TypeScript中shelljs.cp函数的典型用法代码示例。如果您正苦于以下问题:TypeScript cp函数的具体用法?TypeScript cp怎么用?TypeScript cp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cp函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: it
it('codecoverage.publish : publish code coverage files with additional files having same file name', function(done) {
this.timeout(2000);
var additionalFileDirectory = path.join(shell.tempdir(), "files");
var duplicateDirectory = path.join(additionalFileDirectory, "duplicate");
shell.mkdir('-p', additionalFileDirectory);
shell.mkdir('-p', duplicateDirectory);
shell.cp('-f', path.resolve(__dirname, './codecoveragefiles/jacoco.xml'), additionalFileDirectory);
shell.cp('-f', path.resolve(__dirname, './codecoveragefiles/jacoco.xml'), duplicateDirectory);
var properties: { [name: string]: string } = { "summaryfile": coberturaSummaryFile, "codecoveragetool": "Cobertura", "reportdirectory": "", "additionalcodecoveragefiles": path.join(additionalFileDirectory, "jacoco.xml") + "," + path.join(duplicateDirectory, "jacoco.xml") };
var command: cm.ITaskCommand = new tc.TestCommand(null, null, null);
command.properties = properties;
var coberturaSummaryReader = new csr.CoberturaSummaryReader(command);
var jobInfo = new jobInf.TestJobInfo({});
jobInfo.variables = { "agent.workingDirectory": __dirname, "build.buildId": "1" };
testExecutionContext = new tec.TestExecutionContext(jobInfo);
var codeCoveragePublishCommand = new cpc.CodeCoveragePublishCommand(testExecutionContext, command);
codeCoveragePublishCommand.runCommandAsync().then(function(result) {
assert(testExecutionContext.service.jobsCompletedSuccessfully(), 'CodeCoveragePublish Task Failed! Details : ' + testExecutionContext.service.getRecordsString());
assert(testExecutionContext.service.containerItems.length == 3);
assert(testExecutionContext.service.artifactNames.length == 2);
assert(testExecutionContext.service.artifactNames[0] == "Code Coverage Report_1");
assert(testExecutionContext.service.artifactNames[1] == "Code Coverage Files_1");
assert(result);
done();
},
function(err) {
assert(false, 'CodeCoveragePublish Task Failed! Details : ' + err.message);
done();
});
})
开发者ID:IvyMH,项目名称:vso-agent,代码行数:32,代码来源:publishcodecoveragetests.ts
示例2: copyAssets
export function copyAssets(env: BuildEnv): void {
signale.await('Copy assets')
const dir = 'build/dist'
shelljs.rm('-rf', dir)
shelljs.mkdir('-p', dir)
shelljs.cp('-R', 'src/extension/assets/*', dir)
shelljs.cp('-R', 'src/extension/views/*', dir)
signale.success('Assets copied')
}
开发者ID:JoYiRis,项目名称:sourcegraph,代码行数:9,代码来源:tasks.ts
示例3: Given
Given('my workspace contains an image {string}', function(imageName) {
mkdirp.sync(path.join(this.rootDir, path.dirname(imageName)))
cp(
path.join(__dirname, path.basename(imageName)),
path.join(this.rootDir, imageName)
)
})
开发者ID:Originate,项目名称:tutorial-runner,代码行数:7,代码来源:given-steps.ts
示例4: transferDirectory
public async transferDirectory(deviceAppData: Mobile.IDeviceAppData, localToDevicePaths: Mobile.ILocalToDevicePathData[], projectFilesPath: string): Promise<Mobile.ILocalToDevicePathData[]> {
const destinationPath = await deviceAppData.getDeviceProjectRootPath();
this.$logger.trace(`Transferring from ${projectFilesPath} to ${destinationPath}`);
const sourcePath = path.join(projectFilesPath, "*");
shelljs.cp("-Rf", sourcePath, destinationPath);
return localToDevicePaths;
}
开发者ID:NativeScript,项目名称:nativescript-cli,代码行数:7,代码来源:ios-simulator-file-system.ts
示例5: function
function(dir) {
if(dir) {
console.log(`extracting ${dir}`);
// copy the filtered directory into the target directory
sh.cp('-R', dir, targetDir);
}
}
开发者ID:htammen,项目名称:sapui5_sources_extract,代码行数:7,代码来源:create_js_resources.ts
示例6: copyTemplate
function copyTemplate(sourcearr, folderarr) {
for (let target of folderarr) {
for (let source of sourcearr) {
shell.cp('-f', source, target);
}
}
}
开发者ID:goumang2010,项目名称:NetTxtNote,代码行数:7,代码来源:_copy.ts
示例7: relative
bundle.src.program.getSourceFiles().forEach(sourceFile => {
if (!sourceFile.isDeclarationFile) {
const relativePath = relative(entryPointPath, sourceFile.fileName);
const newFilePath = join(newDir, relativePath);
mkdir('-p', dirname(newFilePath));
cp(sourceFile.fileName, newFilePath);
}
});
开发者ID:alxhub,项目名称:angular,代码行数:8,代码来源:new_entry_point_file_writer.ts
示例8: return
return (() => {
this.$logger.trace(`Transferring from ${localFilePath} to ${deviceFilePath}`);
if (this.$fs.getFsStats(localFilePath).wait().isDirectory()) {
shelljs.mkdir(deviceFilePath);
} else {
shelljs.cp("-f", localFilePath, deviceFilePath);
}
}).future<void>()();
开发者ID:enchev,项目名称:mobile-cli-lib,代码行数:8,代码来源:ios-simulator-file-system.ts
示例9: function
var overwriteFile = function(src, dest) {
console.log('writing: ' + dest);
if (shell.test('-f', dest)) {
shell.rm('-f', dest);
}
shell.cp(src, dest);
}
开发者ID:ElleCox,项目名称:vso-agent,代码行数:8,代码来源:installer.ts
示例10: transferFile
public async transferFile(localFilePath: string, deviceFilePath: string): Promise<void> {
this.$logger.trace(`Transferring from ${localFilePath} to ${deviceFilePath}`);
if (this.$fs.getFsStats(localFilePath).isDirectory()) {
this.$fs.ensureDirectoryExists(deviceFilePath);
} else {
this.$fs.ensureDirectoryExists(path.dirname(deviceFilePath));
shelljs.cp("-f", localFilePath, deviceFilePath);
}
}
开发者ID:NativeScript,项目名称:nativescript-cli,代码行数:9,代码来源:ios-simulator-file-system.ts
注:本文中的shelljs.cp函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论