当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Project.Project类代码示例

本文整理汇总了TypeScript中@atomist/rug/model/Project.Project的典型用法代码示例。如果您正苦于以下问题:TypeScript Project类的具体用法?TypeScript Project怎么用?TypeScript Project使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Project类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: cleanChangeLog

export function cleanChangeLog(project: Project, owner: string): void {
    const changeLog: File = project.findFile("CHANGELOG.md");
    const middleContentRE = "\\d+\\.\\d+\\.\\d+\\.\\.\\.HEAD\n\n[\\S\\s]*## \\[0\\.1\\.0\\]";
    changeLog.regexpReplace(middleContentRE, "0.1.0...HEAD\n\n## [0.1.0]");
    changeLog.regexpReplace("\n### Added[\\S\\s]*", "\nAdded\n\n-   Everything\n");
    changeLog.replace("spring-rugs", project.name);
    changeLog.replace("atomist-rugs", owner);
}
开发者ID:atomist-attic,项目名称:spring-rugs,代码行数:8,代码来源:RugGeneratorFunctions.ts

示例2: cleanReadMe

export function cleanReadMe(project: Project, description: string, owner: string): void {
    const readMe: File = project.findFile("README.md");
    readMe.regexpReplace("^# Atomist 'spring-rugs'[\\S\\s]*\n## Spring Boot REST Service\n",
        `# ${project.name}

This project contains a [Spring Boot][boot] [REST][rest] service for ${description}.
`);
}
开发者ID:atomist-attic,项目名称:spring-rugs,代码行数:8,代码来源:RugGeneratorFunctions.ts

示例3: renameClass

export function renameClass(project: Project, oldClass: string, newClass: string): void {
    const eng: PathExpressionEngine = project.context.pathExpressionEngine;
    eng.with<JavaType>(project, `//JavaType()`, j => {
        if (j.name.indexOf(oldClass) >= 0) {
            j.renameByReplace(oldClass, newClass);
        }
    });
    project.replace(oldClass, newClass);
}
开发者ID:atomist-attic,项目名称:spring-rugs,代码行数:9,代码来源:RugGeneratorFunctions.ts

示例4: Then

Then("file at ([^\\s]+) should not exist", (p: Project, world: ProjectScenarioWorld, path: string) => {
    return !p.fileExists(path);
});
开发者ID:atomist-attic,项目名称:spring-rugs,代码行数:3,代码来源:NewSpringBootRestMicroserviceProjectSteps.ts

示例5:

toDelete.forEach(f => project.deleteFile(f));
开发者ID:atomist-attic,项目名称:spring-rugs,代码行数:1,代码来源:RugGeneratorFunctions.ts


注:本文中的@atomist/rug/model/Project.Project类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。