· 6 years ago · Oct 08, 2019, 05:54 AM
1const pkg = require('./package')
2
3module.exports = {
4 mode: 'spa',
5
6 /*
7 ** Headers of the page
8 */
9 head: {
10 title: 'Tonase',
11 meta: [
12 { charset: 'utf-8' },
13 { name: 'viewport', content: 'width=device-width, initial-scale=1' },
14 { hid: 'description', name: 'description', content: pkg.description }
15 ],
16 link: [
17 { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
18 { rel: 'stylesheet', href: 'https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.3.2/css/simple-line-icons.min.css' },
19 { rel: 'stylesheet', href: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css' },
20 { rel: 'stylesheet', href: 'https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css' },
21 { rel: 'stylesheet', href: 'https://unpkg.com/vue-multiselect@2.1.0/dist/vue-multiselect.min.css' },
22 ],
23 script: [
24 {
25 src: "https://www.google.com/recaptcha/api.js",
26 src: "https://unpkg.com/v-data-table/dist/v-data-table.js",
27 src: "https://code.jquery.com/jquery-3.3.1.min.js",
28 type: "text/javascript"
29 }
30 ]
31 },
32
33 /*
34 ** Customize the progress-bar color
35 */
36 loading: { color: '#1266ae' },
37
38 /*
39 ** Global CSS
40 */
41 css: [
42 '~/assets/styles.scss'
43 ],
44
45 /*
46 ** Plugins to load before mounting the App
47 */
48 plugins: [
49 '~/plugins/global',
50 '~/plugins/axios',
51 '~/plugins/priceformat',
52 { src: '~plugins/pusher.js', ssr: false },
53 ],
54
55 /*
56 ** Nuxt.js modules
57 */
58 modules: [
59 // Doc: https://bootstrap-vue.js.org/docs/
60 'bootstrap-vue/nuxt',
61 '@nuxtjs/axios',
62 '@nuxtjs/proxy',
63 '@nuxtjs/auth',
64 '@nuxtjs/toast',
65 'nuxt-validate',
66 'nuxt-google-maps-module',
67 'nuxt-material-design-icons',
68 'nuxt-validate',
69 'nuxt-izitoast',
70 [
71 'vue-sweetalert2/nuxt',
72 {
73 confirmButtonColor: '#41b882',
74 cancelButtonColor: '#ff7674'
75 },
76 ],
77 ['nuxt-fontawesome', {
78 component: 'fa',
79 imports: [
80 //import whole set
81 {
82 set: '@fortawesome/free-solid-svg-icons',
83 icons: ['fas']
84 }
85 ]
86 }],
87 ],
88
89 vue: {
90 config: {
91 productionTip: false,
92 devtools: true
93 }
94 },
95
96 env: {
97 grant_type: 'password',
98 client_secret: 'bYkuYXHbdqcmCf2SodeJ3NLTZS3uAPkXBpfjw7cY',
99 client_id: '2',
100 server_url: 'http://tonase.test/',
101 pusher_key : 'caafa63aa6fd7892c378'
102 },
103
104 maps: {
105 key: 'AIzaSyDA3RmcrgATNdt8B1IcSo454nBQPeP3K0A',
106 },
107
108 bootstrapVue: {
109 bootstrapCSS: 'css',
110 bootstrapVueCSS: 'bvCSS'
111 },
112
113 toast: {
114 position: 'top-right',
115 duration: 5000,
116 iconPack: 'material'
117 },
118
119 izitoast: {
120 position: 'topRight',
121 transitionIn: 'bounceInLeft',
122 transitionOut: 'fadeOutRight',
123 displayMode: 1
124 },
125
126 loading: {
127 name: 'chasing-dots',
128 color: 'white',
129 background: '#1266ae',
130 height: '4px'
131 },
132
133 axios: {
134 baseURL: 'http://tonase.test',
135 proxyHeaders: false,
136 credentials: false,
137 },
138
139 auth: {
140 strategies: {
141 local: {
142 endpoints: {
143 login: {url: 'oauth/token', method: 'post', propertyName: 'access_token' },
144 logout: false,
145 user: {url: 'v1/user/profile', method: 'get', propertyName: 'data' }
146 },
147 tokenRequired: true,
148 tokenType: 'Bearer'
149 },
150 facebook: {
151 client_id: 'your facebook app id',
152 userinfo_endpoint: 'https://graph.facebook.com/v2.12/me?fields=about,name,picture{url},email',
153 scope: ['public_profile', 'email']
154 },
155 google: {
156 client_id: 'your gcloud oauth app client id'
157 },
158 },
159 redirect : false
160 },
161
162 /*
163 ** Build configuration
164 */
165 build: {
166 /*
167 ** You can extend webpack config here
168 */
169 extend(config, ctx) {
170 config.module.rules.push({
171 test: /\.(ogg|mp3|wav|mpe?g)$/i,
172 loader: 'file-loader',
173 options: {
174 name: '[path][name].[ext]',
175 },
176 })
177 }
178 }
179}