Removed getPageTemplate from the git service file
This commit is contained in:
Родитель
8ab9da836a
Коммит
12da582005
|
@ -1,5 +1,4 @@
|
|||
interface INsStarterKitsGitService {
|
||||
getPackageJsonFromSource(templateName: string): Promise<any>;
|
||||
getAssetsContent(templateName: string, versionTag: string): Promise<any>;
|
||||
getPageTemplate(pageName: string, flavor: string, templatesDirectory: string): Promise<string>;
|
||||
}
|
||||
|
|
|
@ -44,11 +44,7 @@ export class NsStarterKitsGitService implements INsStarterKitsGitService {
|
|||
|
||||
return this.getResourcesFromSource(templateName, assets, version);
|
||||
}
|
||||
|
||||
getPageTemplate(pageName: string, flavor: string, templatesDirectory: string): Promise<any> {
|
||||
return this.$nsStarterKitsNpmService.installPageTemplateFromNpm(pageName, flavor, templatesDirectory);
|
||||
}
|
||||
|
||||
|
||||
private getResourcesFromSource(templateName: string, assetDictionary: any, versionTag: string): Promise<any> {
|
||||
const promisesMap: Map<string, Promise<any>> = new Map();
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ const ejs = require("ejs");
|
|||
|
||||
export class NsStarterKitsPageService implements INsStarterKitsPageService {
|
||||
|
||||
constructor(private $nsStarterKitsGitService: INsStarterKitsGitService) {
|
||||
constructor(private $nsStarterKitsNpmService: INsStarterKitsNpmService) {
|
||||
}
|
||||
|
||||
getPages() {
|
||||
|
@ -36,7 +36,7 @@ export class NsStarterKitsPageService implements INsStarterKitsPageService {
|
|||
return Promise.reject(new Error(`Page with the name "${pageName}" already exists`));
|
||||
}
|
||||
|
||||
return this.$nsStarterKitsGitService.getPageTemplate(displayName, pageTemplate.templateFlavor, pagesDirectory);
|
||||
return this.$nsStarterKitsNpmService.installPageTemplateFromNpm(displayName, pageTemplate.templateFlavor, pagesDirectory);
|
||||
})
|
||||
.then((downloadPath: any) => {
|
||||
return this.createPage(downloadPath, newPageDirectory, pageName);
|
||||
|
|
Загрузка…
Ссылка в новой задаче