-
-
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 #2027 from matthieuRioual/addRouterViewDefault
Add homepage component and router view in App main component
- Loading branch information
Showing
19 changed files
with
159 additions
and
81 deletions.
There are no files selected for viewing
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
16 changes: 16 additions & 0 deletions
16
...esources/generator/client/vue/test/spec/common/primary/homepage/Homepage.spec.ts.mustache
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,16 @@ | ||
import { shallowMount, VueWrapper } from '@vue/test-utils'; | ||
import { HomepageVue } from '@/common/primary/homepage'; | ||
|
||
let wrapper: VueWrapper; | ||
|
||
const wrap = () => { | ||
wrapper = shallowMount(HomepageVue); | ||
}; | ||
|
||
describe('App', () => { | ||
it('should exist', () => { | ||
wrap(); | ||
expect(wrapper.exists()).toBeTruthy(); | ||
}); | ||
}); |
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
2 changes: 1 addition & 1 deletion
2
src/main/resources/generator/client/vue/webapp/app/common/domain/Message.ts.mustache
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 |
---|---|---|
@@ -1 +1 @@ | ||
export type Message = string; | ||
export type Message = string; |
5 changes: 0 additions & 5 deletions
5
...in/resources/generator/client/vue/webapp/app/common/primary/app/App.component.ts.mustache
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 |
---|---|---|
@@ -1,8 +1,3 @@ | ||
export default { | ||
name: 'App', | ||
data: () => { | ||
return { | ||
appName: '{{baseName}}', | ||
}; | ||
}, | ||
}; |
26 changes: 1 addition & 25 deletions
26
src/main/resources/generator/client/vue/webapp/app/common/primary/app/App.html.mustache
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 |
---|---|---|
@@ -1,25 +1 @@ | ||
<div id="app"> | ||
<img alt="Vue logo" src="/content/images/VueLogo.png" /> | ||
<br> | ||
<img alt="JHipster logo" src="../../../../content/images/JHipster-Lite-neon-green.png" /> | ||
<h1>{{=<% %>=}}{{ appName }}<%={{ }}=%>: Vue 3 + TypeScript + Vite</h1> | ||
<p> | ||
Recommended IDE setup: | ||
<a href="https://code.visualstudio.com/" target="_blank" rel="noopener">VSCode</a> | ||
+ | ||
<a href="https://github.com/johnsoncodehk/volar" target="_blank" rel="noopener">Volar</a> | ||
</p> | ||
|
||
<p> | ||
<a href="https://vitejs.dev/guide/features.html" target="_blank" rel="noopener"> | ||
Vite Documentation | ||
</a> | ||
| | ||
<a href="https://v3.vuejs.org/" target="_blank" rel="noopener">Vue 3 Documentation</a> | ||
</p> | ||
|
||
<p> | ||
Edit | ||
<code>src/main/webapp/app/common/primary/app/App.vue</code> to test hot module replacement. | ||
</p> | ||
</div> | ||
<router-view></router-view> |
26 changes: 0 additions & 26 deletions
26
src/main/resources/generator/client/vue/webapp/app/common/primary/app/App.vue.mustache
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 |
---|---|---|
@@ -1,29 +1,3 @@ | ||
<template src="./App.html"></template> | ||
|
||
<script lang="ts" src="./App.component.ts"></script> | ||
|
||
<style> | ||
#app { | ||
font-family: Avenir, Helvetica, Arial, sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-align: center; | ||
color: #2c3e50; | ||
margin-top: 60px; | ||
} | ||
a { | ||
color: #42b983; | ||
} | ||
label { | ||
margin: 0 0.5em; | ||
font-weight: bold; | ||
} | ||
code { | ||
background-color: #eee; | ||
padding: 2px 4px; | ||
border-radius: 4px; | ||
color: #304455; | ||
} | ||
</style> |
8 changes: 8 additions & 0 deletions
8
...es/generator/client/vue/webapp/app/common/primary/homepage/Homepage.component.ts.mustache
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,8 @@ | ||
export default { | ||
name: 'Homepage', | ||
data: () => { | ||
return { | ||
appName: 'jhipster', | ||
}; | ||
}, | ||
}; |
23 changes: 23 additions & 0 deletions
23
.../resources/generator/client/vue/webapp/app/common/primary/homepage/Homepage.html.mustache
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,23 @@ | ||
<div id="app"> | ||
<img alt="Vue logo" src="/content/images/VueLogo.png" /> | ||
<br /> | ||
<img alt="JHipster logo" src="../../../../content/images/JHipster-Lite-neon-green.png" /> | ||
<h1>: Vue 3 + TypeScript + Vite</h1> | ||
<p> | ||
Recommended IDE setup: | ||
<a href="https://code.visualstudio.com/" target="_blank" rel="noopener">VSCode</a> | ||
+ | ||
<a href="https://github.com/johnsoncodehk/volar" target="_blank" rel="noopener">Volar</a> | ||
</p> | ||
|
||
<p> | ||
<a href="https://vitejs.dev/guide/features.html" target="_blank" rel="noopener"> Vite Documentation </a> | ||
| | ||
<a href="https://v3.vuejs.org/" target="_blank" rel="noopener">Vue 3 Documentation</a> | ||
</p> | ||
|
||
<p> | ||
Edit | ||
<code>src/main/webapp/app/common/primary/app/App.vue</code> to test hot module replacement. | ||
</p> | ||
</div> |
29 changes: 29 additions & 0 deletions
29
...n/resources/generator/client/vue/webapp/app/common/primary/homepage/Homepage.vue.mustache
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,29 @@ | ||
<template src="./Homepage.html"></template> | ||
|
||
<script lang="ts" src="./Homepage.component.ts"></script> | ||
|
||
<style> | ||
#app { | ||
font-family: Avenir, Helvetica, Arial, sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-align: center; | ||
color: #2c3e50; | ||
margin-top: 60px; | ||
} | ||
a { | ||
color: #42b983; | ||
} | ||
label { | ||
margin: 0 0.5em; | ||
font-weight: bold; | ||
} | ||
code { | ||
background-color: #eee; | ||
padding: 2px 4px; | ||
border-radius: 4px; | ||
color: #304455; | ||
} | ||
</style> |
4 changes: 4 additions & 0 deletions
4
src/main/resources/generator/client/vue/webapp/app/common/primary/homepage/index.ts.mustache
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,4 @@ | ||
import HomepageComponent from './Homepage.component'; | ||
import HomepageVue from './Homepage.vue'; | ||
|
||
export { HomepageComponent, HomepageVue }; |
10 changes: 5 additions & 5 deletions
10
src/main/resources/generator/client/vue/webapp/app/router/router.ts.mustache
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
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