@@ -19,7 +19,6 @@ export class ProjectService implements IProjectService {
19
19
private $projectNameService : IProjectNameService ,
20
20
private $projectTemplatesService : IProjectTemplatesService ,
21
21
private $staticConfig : IStaticConfig ,
22
- private $packageInstallationManager : IPackageInstallationManager ,
23
22
private $tempService : ITempService ) { }
24
23
25
24
public async validateProjectName ( opts : { projectName : string , force : boolean , pathToProject : string } ) : Promise < string > {
@@ -91,10 +90,6 @@ export class ProjectService implements IProjectService {
91
90
92
91
await this . ensureAppResourcesExist ( projectDir ) ;
93
92
94
- if ( ! ( templatePackageJsonContent && templatePackageJsonContent . dependencies && templatePackageJsonContent . dependencies [ constants . TNS_CORE_MODULES_NAME ] ) ) {
95
- await this . addTnsCoreModules ( projectDir ) ;
96
- }
97
-
98
93
if ( templateVersion === constants . TemplateVersions . v1 ) {
99
94
this . mergeProjectAndTemplateProperties ( projectDir , templatePackageJsonContent ) ; // merging dependencies from template (dev && prod)
100
95
this . removeMergedDependencies ( projectDir , templatePackageJsonContent ) ;
@@ -246,16 +241,5 @@ export class ProjectService implements IProjectService {
246
241
private setAppId ( projectDir : string , projectId : string ) : void {
247
242
this . $projectDataService . setNSValue ( projectDir , "id" , projectId ) ;
248
243
}
249
-
250
- @performanceLog ( )
251
- private async addTnsCoreModules ( projectDir : string ) : Promise < void > {
252
- const projectFilePath = path . join ( projectDir , this . $staticConfig . PROJECT_FILE_NAME ) ;
253
- const packageJsonData = this . $fs . readJson ( projectFilePath ) ;
254
-
255
- const version = await this . $packageInstallationManager . getLatestCompatibleVersion ( constants . TNS_CORE_MODULES_NAME ) ;
256
- packageJsonData . dependencies [ constants . TNS_CORE_MODULES_NAME ] = version ;
257
-
258
- this . $fs . writeJson ( projectFilePath , packageJsonData ) ;
259
- }
260
244
}
261
245
$injector . register ( "projectService" , ProjectService ) ;
0 commit comments