File tree Expand file tree Collapse file tree 2 files changed +81
-0
lines changed Expand file tree Collapse file tree 2 files changed +81
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ It is able to generate apps using the following frontend stacks:
11
11
* [ React with Redux] ( react.md )
12
12
* [ React Native] ( react-native.md )
13
13
* [ Vue.js] ( vuejs.md )
14
+ * [ Quasar Framework] ( quasar.md )
14
15
15
16
Client Generator works especially well with APIs built with the [ API Platform] ( https://api-platform.com ) framework.
16
17
Original file line number Diff line number Diff line change
1
+ # Quasar Framework Generator
2
+
3
+ Create a Quasar Framework application using
4
+ [ quasar-cli] ( https://quasar.dev/quasar-cli/installation ) :
5
+
6
+ $ quasar create my-app
7
+ $ cd my-app
8
+
9
+ $ yarn global add @api-platform/client-generator
10
+
11
+ In the app directory, generate the files for the resource you want:
12
+
13
+ $ generate-api-platform-client -g quasar https://demo.api-platform.com src/ --resource foo
14
+ # Replace the URL by the entrypoint of your Hydra-enabled API
15
+ # Omit the resource flag to generate files for all resource types exposed by the API
16
+
17
+ The code is ready to be executed! Register the generated routes in ` src/router/routes.js `
18
+
19
+ ``` javascript
20
+ import fooRoutes from ' ../generated/router/foo' ;
21
+
22
+ const routes = [
23
+ {
24
+ path: ' /' ,
25
+ component : () => import (' layouts/MyLayout.vue' ),
26
+ children: [
27
+ ... fooRoutes
28
+ ],
29
+
30
+ ` ` `
31
+
32
+ and store modules in the ` src/ store/ index .js ` file.
33
+
34
+ ` ` ` javascript
35
+ // Replace "foo" with the name of the resource type
36
+ import foo from ' ../generated/store/modules/foo/' ;
37
+
38
+ export default function (/* { ssrContext } */ ) {
39
+ const Store = new Vuex.Store ({
40
+ modules: {
41
+ foo,
42
+ },
43
+
44
+ ` ` `
45
+
46
+ Make sure to update the ` quasar .conf .js ` file with the following:
47
+
48
+ ` ` ` javascript
49
+ framework: {
50
+ components: [
51
+ ' QTable' ,
52
+ ' QTh' ,
53
+ ' QTr' ,
54
+ ' QTd' ,
55
+ ' QAjaxBar' ,
56
+ ' QBreadcrumbs' ,
57
+ ' QBreadcrumbsEl' ,
58
+ ' QSpace' ,
59
+ ' QInput' ,
60
+ ' QForm' ,
61
+ ' QSelect' ,
62
+ ' QMarkupTable' ,
63
+ ' QDate' ,
64
+ ' QTime' ,
65
+ ' QCheckbox' ,
66
+ ' QPopupProxy'
67
+
68
+ ...
69
+ ],
70
+ directives: [... , ' ClosePopup' ],
71
+ plugins: [' Notify' ],
72
+ config: {
73
+ ...
74
+ notify: {
75
+ position: ' top' ,
76
+ multiLine: true ,
77
+ timeout: 0 ,
78
+ },
79
+ },
80
+ ` ` `
You can’t perform that action at this time.
0 commit comments