Skip to content

Commit 6b73294

Browse files
committed
prepare template fix
1 parent 94cd768 commit 6b73294

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lib/services/project-service.ts

+1-12
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,8 @@ export class ProjectService implements IProjectService {
7474
try {
7575
//TODO: plamen5kov: move copy of template and npm uninstall in prepareTemplate logic
7676
this.createProjectCore(projectDir, appPath, projectId).wait();
77-
//update dependencies and devDependencies of newly created project with data from template
7877
this.mergeProjectAndTemplateProperties(projectDir, appPath).wait(); //merging dependencies from template (dev && prod)
79-
this.updateAppResourcesDir(projectAppDirectory, appPath).wait();
80-
this.$npm.install(projectAppDirectory, projectAppDirectory, { "ignore-scripts": this.$options.ignoreScripts }).wait();
78+
this.$npm.install(projectDir, projectDir, { "ignore-scripts": this.$options.ignoreScripts }).wait();
8179
selectedTemplate = selectedTemplate || "";
8280
let templateName = (constants.RESERVED_TEMPLATE_NAMES[selectedTemplate.toLowerCase()] || selectedTemplate/*user template*/) || constants.RESERVED_TEMPLATE_NAMES["default"];
8381
this.$npm.uninstall(templateName, {save: true}, projectDir).wait();
@@ -114,15 +112,6 @@ export class ProjectService implements IProjectService {
114112
}).future<void>()();
115113
}
116114

117-
private updateAppResourcesDir(projectAppDirectory: string, appPath: string): IFuture<void> {
118-
return (() => {
119-
let defaultAppResourcesDir = path.join(appPath, constants.APP_RESOURCES_FOLDER_NAME);
120-
let targetAppResourcesDir = path.join(projectAppDirectory, constants.APP_RESOURCES_FOLDER_NAME);
121-
this.$logger.trace(`Updating AppResources values from ${defaultAppResourcesDir} to ${targetAppResourcesDir}`);
122-
shelljs.cp("-R", path.join(defaultAppResourcesDir, "*"), targetAppResourcesDir);
123-
}).future<void>()();
124-
}
125-
126115
private mergeDependencies(projectDependencies: IStringDictionary, templateDependencies: IStringDictionary): IStringDictionary {
127116
// Cast to any when logging as logger thinks it can print only string.
128117
// Cannot use toString() because we want to print the whole objects, not [Object object]

0 commit comments

Comments
 (0)