Skip to content

Commit 51f53ca

Browse files
Merge pull request #27 from kingscode/update-scaffold
update scaffold with our latest standards
2 parents 11c04ed + 43b0f3c commit 51f53ca

File tree

78 files changed

+1717
-1039
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1717
-1039
lines changed

README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ vue add kingscode-scaffold
1010
npm run serve
1111
```
1212

13-
Mind that some of the choices you make in the `vue create my-app` and
14-
later in the `vue add vuetify` will be overwritten by vuetify or the kings code scaffold.
13+
Mind that some choices you make in the `vue create my-app` and
14+
later in the `vue add vuetify` will be overwritten by vuetify, or the kings code scaffold.
1515

1616

1717
## Configuration
1818

19-
```
20-
Notice: it does not matter which choice you make with options that are not documented.
21-
```
19+
> Notice: it does not matter which choice you make with options that are not documented.
20+
2221

2322
### Vue:
2423
We'd recommend you to choose
@@ -36,12 +35,7 @@ And then:
3635
The rest doesn't matter.
3736

3837
### Vuetify
39-
Configure:
40-
- Pre made templates will be overwritten, so keep it default
41-
- Custom properties
42-
- Font awesome 5 (this will be overwritten with font awesome pro)
43-
- Use a-la-carte components
44-
- Locale will be overwritten to dutch as default
38+
Choose recommended
4539

4640
### Kingscode scaffold
4741
This is our own scaffold, which you can use with our laravel API you can answer the questions

generator/index.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ module.exports = (api, options) => {
55
api.extendPackage({
66
dependencies: {
77
'axios': '^0.19.2',
8-
'dayjs': '^1.8.19',
9-
'vuex': '^3.1.2',
8+
'dayjs': '^1.8.34',
9+
'vuex': '^3.4.0',
1010
'vuex-persistedstate': '^2.5.4',
11-
'lodash.clonedeep': '^4.5.0',
1211
'css-vars-ponyfill': '^2.1.2',
1312
'qs': '^6.9.4',
1413
'vue-router': '3.3.4',
14+
'vue-i18n': '^8.21.0',
15+
1516
},
1617
});
1718
if (options.plugins.includes('fontawesomepro')) {
@@ -28,15 +29,6 @@ module.exports = (api, options) => {
2829
});
2930
}
3031

31-
if (options.useCrud) {
32-
api.extendPackage({
33-
dependencies: {
34-
'@kingscode/vuetify-resource': '^2.0.3',
35-
},
36-
});
37-
api.render('./templates/Crud', options);
38-
}
39-
4032
if (options.useGithubDeployments) {
4133
api.render('./templates/Deployment', options);
4234
}
@@ -51,6 +43,15 @@ module.exports = (api, options) => {
5143
api.render('./templates/Authorisation', options);
5244
}
5345

46+
if (options.useCrud) {
47+
api.extendPackage({
48+
dependencies: {
49+
'@kingscode/vuetify-resource': '^2.0.3',
50+
},
51+
});
52+
api.render('./templates/Crud', options);
53+
}
54+
5455
if (options.plugins.includes('sentry')) {
5556
api.extendPackage({
5657
dependencies: {

generator/templates/Authorisation/src/api/endpoints/authorisation/login.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { post } from '../../implementation/app';
22

33
export default function (email, password) {
44
return post('auth/login', {
5-
email: email,
6-
password: password,
5+
email,
6+
password,
77
});
88
}

generator/templates/Authorisation/src/api/endpoints/authorisation/password.js

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { post } from '@/api/implementation/app';
2+
3+
export default function (email) {
4+
return post('password/forgotten', {
5+
email,
6+
});
7+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { post } from '@/api/implementation/app';
2+
3+
export default async function (email, token, password, passwordConfirmation) {
4+
return post('password/reset', {
5+
email,
6+
token,
7+
password,
8+
passwordConfirmation,
9+
});
10+
}
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
import { post } from '../../implementation/app';
22

3-
function register(email, name) {
4-
return post('registration', {
3+
function verify(token, email, password, passwordConfirmation) {
4+
return post('registration/verify', {
5+
token,
56
email,
6-
name,
7+
password,
8+
passwordConfirmation,
79
});
810
}
911

10-
function verify(token, email, password, passwordConfirmation) {
11-
return post('registration/verify', {
12-
token: token,
13-
email: email,
14-
password: password,
15-
password_confirmation: passwordConfirmation,
12+
function acceptInvitation(email, token, password, passwordConfirmation) {
13+
return post('invitation/accept', {
14+
email,
15+
password,
16+
passwordConfirmation,
17+
token,
1618
});
1719
}
1820

1921
export {
20-
register,
2122
verify,
23+
acceptInvitation,
2224
};

generator/templates/Authorisation/src/api/endpoints/password/reset.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { post } from '../../implementation/app';
22

33
export default async function (email, token, password, passwordConfirmation) {
44
return post('registration', {
5-
email: email,
6-
token: token,
7-
password: password,
8-
password_confirmation: passwordConfirmation,
5+
email,
6+
token,
7+
password,
8+
passwordConfirmation,
99
});
1010
}

generator/templates/Authorisation/src/api/endpoints/user.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

generator/templates/Authorisation/src/components/Authorisation/PasswordForgottenCard.vue

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)