-
-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #985 from Franceq34/add-project-name-package-and-p…
…ort-to-generator Add project name, package and port to front generator
- Loading branch information
Showing
31 changed files
with
288 additions
and
66 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type BaseName = string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type Folder = string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type PackageName = string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type Port = number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Port } from '@/springboot/domain/Port'; | ||
import { Folder } from '@/springboot/domain/Folder'; | ||
import { PackageName } from '@/springboot/domain/PackageName'; | ||
import { BaseName } from '@/springboot/domain/BaseName'; | ||
import { ProjectName } from '@/springboot/domain/ProjectName'; | ||
|
||
export interface Project { | ||
folder: Folder; | ||
baseName?: BaseName; | ||
projectName?: ProjectName; | ||
packageName?: PackageName; | ||
serverPort?: Port; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type ProjectName = string; |
2 changes: 1 addition & 1 deletion
2
...pp/app/generator/domain/ProjectService.ts → ...p/app/springboot/domain/ProjectService.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 9 additions & 7 deletions
16
.../generator/primary/Generator.component.ts → ...springboot/primary/Generator.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<h1 data-selector="generator.title">JHLite</h1> | ||
<h2 data-selector="generator.subtitle">SpringBoot Generator</h2> | ||
<h3>Project configuration</h3> | ||
<form> | ||
<p> | ||
<label for="path">Path* : </label> | ||
<input id="path" type="text" v-model="project.folder" required /> | ||
</p> | ||
<p> | ||
<label for="basename">Basename : </label> | ||
<input id="basename" type="text" v-model="project.baseName" /> | ||
</p> | ||
<p> | ||
<label for="projectname">Project name : </label> | ||
<input id="projectname" type="text" v-model="project.projectName" /> | ||
</p> | ||
<p> | ||
<label for="packagename">Package name : </label> | ||
<input id="packagename" type="text" v-model="project.packageName" /> | ||
</p> | ||
<p> | ||
<label for="serverport">Server port : </label> | ||
<input id="serverport" type="number" v-model="project.serverPort" /> | ||
</p> | ||
<hr /> | ||
<button id="init" @click.prevent="initProject" data-selector="generator.init-button">Init</button> | ||
<button id="maven" @click.prevent="addMaven" data-selector="generator.add-maven-button">Maven</button> | ||
<button id="javabase" @click.prevent="addJavaBase" data-selector="generator.add-java-base-button">JavaBase</button> | ||
<button id="springboot" @click.prevent="addSpringBoot" data-selector="generator.add-spring-boot-button">SpringBoot</button> | ||
</form> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Project } from '@/springboot/domain/Project'; | ||
|
||
export interface ProjectToUpdate { | ||
folder: string; | ||
baseName?: string; | ||
projectName?: string; | ||
packageName?: string; | ||
serverPort?: string; | ||
} | ||
|
||
export const toProject = (projectToUpdate: ProjectToUpdate): Project => ({ | ||
folder: projectToUpdate.folder, | ||
baseName: projectToUpdate.baseName, | ||
projectName: projectToUpdate.projectName, | ||
packageName: projectToUpdate.packageName, | ||
serverPort: toOptionalInteger(projectToUpdate.serverPort), | ||
}); | ||
|
||
const toOptionalInteger = (numberToConvert?: string): number | undefined => { | ||
return numberToConvert ? parseInt(numberToConvert) : undefined; | ||
}; |
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
.../generator/secondary/ProjectRepository.ts → ...springboot/secondary/ProjectRepository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/webapp/app/springboot/secondary/RestGeneratorJHipster.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Project } from '@/springboot/domain/Project'; | ||
|
||
export interface RestGeneratorJHipster { | ||
baseName?: string; | ||
projectName?: string; | ||
packageName?: string; | ||
serverPort?: number; | ||
} | ||
|
||
export const toRestGeneratorJHipster = (project: Project): RestGeneratorJHipster => ({ | ||
baseName: project.baseName, | ||
projectName: project.projectName, | ||
packageName: project.packageName, | ||
serverPort: project.serverPort, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Project } from '@/springboot/domain/Project'; | ||
import { RestGeneratorJHipster, toRestGeneratorJHipster } from './RestGeneratorJHipster'; | ||
|
||
export interface RestProject { | ||
folder: string; | ||
'generator-jhipster': RestGeneratorJHipster; | ||
} | ||
|
||
export const toRestProject = (project: Project): RestProject => ({ | ||
folder: project.folder, | ||
'generator-jhipster': toRestGeneratorJHipster(project), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
src/test/javascript/spec/springboot/domain/Project.fixture.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Project } from '@/springboot/domain/Project'; | ||
|
||
export const createProject = (project?: Partial<Project>): Project => ({ | ||
folder: 'folder/path', | ||
baseName: 'beer', | ||
projectName: 'Beer Project', | ||
packageName: 'tech.jhipster.beer', | ||
serverPort: 8080, | ||
...project, | ||
}); |
2 changes: 1 addition & 1 deletion
2
...enerator/domain/ProjectService.fixture.ts → ...ringboot/domain/ProjectService.fixture.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.