fcad-core-dragon 2.0.0-beta.1 → 2.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +33 -33
- package/.eslintignore +29 -29
- package/{.eslintrc.js → .eslintrc.cjs} +81 -86
- package/CHANGELOG +364 -364
- package/README.md +71 -71
- package/bk.scss +117 -0
- package/package.json +61 -63
- package/src/$locales/en.json +143 -179
- package/src/$locales/fr.json +105 -181
- package/src/assets/data/onboardingMessages.json +47 -47
- package/src/components/AppBase.vue +1054 -614
- package/src/components/AppBaseButton.vue +87 -63
- package/src/components/AppBaseErrorDisplay.vue +438 -420
- package/src/components/AppBaseFlipCard.vue +84 -83
- package/src/components/AppBaseModule.vue +1673 -1842
- package/src/components/AppBasePage.vue +779 -312
- package/src/components/AppBasePopover.vue +41 -0
- package/src/components/AppCompAudio.vue +234 -0
- package/src/components/AppCompBranchButtons.vue +552 -582
- package/src/components/AppCompButtonProgress.vue +126 -147
- package/src/components/AppCompCarousel.vue +298 -192
- package/src/components/AppCompInputCheckBoxNext.vue +195 -0
- package/src/components/AppCompInputDropdownNext.vue +159 -0
- package/src/components/AppCompInputRadioNext.vue +152 -0
- package/src/components/{AppCompInputTextBox.vue → AppCompInputTextNext.vue} +106 -91
- package/src/components/AppCompInputTextTableNext.vue +141 -0
- package/src/components/AppCompInputTextToFillDropdownNext.vue +230 -0
- package/src/components/{AppCompInputTextToFillText.vue → AppCompInputTextToFillNext.vue} +171 -164
- package/src/components/AppCompJauge.vue +74 -55
- package/src/components/AppCompMenu.vue +413 -209
- package/src/components/AppCompMenuItem.vue +228 -174
- package/src/components/AppCompNavigation.vue +960 -949
- package/src/components/AppCompNoteCall.vue +133 -126
- package/src/components/AppCompNoteCredit.vue +292 -164
- package/src/components/AppCompPlayBar.vue +1218 -1319
- package/src/components/AppCompPlayBarNext.vue +2052 -0
- package/src/components/AppCompPlayBarProgress.vue +82 -0
- package/src/components/AppCompPopUpNext.vue +503 -0
- package/src/components/{AppCompQuiz.vue → AppCompQuizNext.vue} +2904 -2989
- package/src/components/AppCompQuizRecall.vue +276 -250
- package/src/components/AppCompSVGNext.vue +347 -0
- package/src/components/AppCompSettingsMenu.vue +172 -171
- package/src/components/AppCompTableOfContent.vue +387 -264
- package/src/components/AppCompTranscript.vue +24 -19
- package/src/components/AppCompVideoPlayer.vue +368 -336
- package/src/components/AppCompViewDisplay.vue +6 -6
- package/src/components/BaseModule.vue +72 -67
- package/src/composables/useQuiz.js +206 -0
- package/src/externalComps/ModuleView.vue +22 -0
- package/src/externalComps/SummaryView.vue +91 -0
- package/src/main.js +272 -227
- package/src/mixins/$mediaMixins.js +819 -0
- package/src/mixins/timerMixin.js +155 -156
- package/src/module/stores/appStore.js +893 -0
- package/src/module/xapi/ADL.js +376 -339
- package/src/module/xapi/Crypto/Hasher.js +241 -241
- package/src/module/xapi/Crypto/WordArray.js +278 -278
- package/src/module/xapi/Crypto/algorithms/BufferedBlockAlgorithm.js +103 -103
- package/src/module/xapi/Crypto/algorithms/C_algo.js +315 -319
- package/src/module/xapi/Crypto/algorithms/HMAC.js +9 -9
- package/src/module/xapi/Crypto/algorithms/SHA1.js +9 -9
- package/src/module/xapi/Crypto/encoders/Base.js +105 -105
- package/src/module/xapi/Crypto/encoders/Base64.js +99 -99
- package/src/module/xapi/Crypto/encoders/Hex.js +61 -61
- package/src/module/xapi/Crypto/encoders/Latin1.js +61 -61
- package/src/module/xapi/Crypto/encoders/Utf8.js +45 -45
- package/src/module/xapi/Crypto/index.js +53 -53
- package/src/module/xapi/Statement/activity.js +47 -47
- package/src/module/xapi/Statement/agent.js +55 -55
- package/src/module/xapi/Statement/group.js +26 -26
- package/src/module/xapi/Statement/index.js +259 -259
- package/src/module/xapi/Statement/statement.js +253 -253
- package/src/module/xapi/Statement/statementRef.js +23 -23
- package/src/module/xapi/Statement/substatement.js +22 -22
- package/src/module/xapi/Statement/verb.js +36 -36
- package/src/module/xapi/activitytypes.js +17 -17
- package/src/module/xapi/launch.js +157 -157
- package/src/module/xapi/utils.js +167 -167
- package/src/module/xapi/verbs.js +294 -294
- package/src/module/xapi/wrapper.js +1963 -1890
- package/src/module/xapi/xapiStatement.js +444 -444
- package/src/plugins/bus.js +8 -3
- package/src/plugins/gsap.js +14 -17
- package/src/plugins/helper.js +308 -295
- package/src/plugins/i18n.js +44 -31
- package/src/plugins/idb.js +219 -212
- package/src/plugins/save.js +37 -37
- package/src/plugins/scorm.js +287 -287
- package/src/plugins/xapi.js +11 -11
- package/src/public/index.html +33 -21
- package/src/router/index.js +43 -41
- package/src/router/routes.js +312 -337
- package/src/shared/generalfuncs.js +210 -188
- package/src/shared/validators.js +1069 -249
- package/vite.config.js +27 -0
- package/.prettierrc.js +0 -5
- package/babel.config.js +0 -3
- package/src/components/AppBaseDragChoice.vue +0 -91
- package/src/components/AppBaseDropZone.vue +0 -112
- package/src/components/AppCompBif.vue +0 -120
- package/src/components/AppCompDragAndDrop.vue +0 -339
- package/src/components/AppCompInputAssociation.vue +0 -332
- package/src/components/AppCompInputCheckBox.vue +0 -227
- package/src/components/AppCompInputDropdown.vue +0 -184
- package/src/components/AppCompInputRadio.vue +0 -169
- package/src/components/AppCompInputTextTable.vue +0 -155
- package/src/components/AppCompInputTextToFillDropdown.vue +0 -255
- package/src/components/AppCompMediaPlayer.vue +0 -397
- package/src/components/AppCompPopUp.vue +0 -522
- package/src/components/AppCompPopover.vue +0 -27
- package/src/components/AppCompSVG.vue +0 -309
- package/src/mixins/$pageMixins.js +0 -459
- package/src/mixins/$quizMixins.js +0 -456
- package/src/module/store.js +0 -895
- package/src/plugins/timeManager.js +0 -77
- package/src/routes_bckp.js +0 -313
- package/src/routes_static.js +0 -344
- package/vue.config.js +0 -83
package/src/routes_static.js
DELETED
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
import Router from 'vue-router'
|
|
2
|
-
import AppCompViewDisplay from './components/AppCompViewDisplay.vue'
|
|
3
|
-
import store from './module/store'
|
|
4
|
-
import { fileAssets } from './shared/generalfuncs'
|
|
5
|
-
// const _path = require('path')
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The router Module defines the routes of the App by:
|
|
9
|
-
* loading the required files for module and activities pages,
|
|
10
|
-
* dynamically creating the navigation route of module base on the file in VIEWS folder
|
|
11
|
-
* dynamically creating the navigation routes of activities and branchings base on the files contained in the MODULE
|
|
12
|
-
* Creating Redirection routes for navigation error
|
|
13
|
-
* Adding the pages for the module in the STORE
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
const _routes = [] // routes of the app
|
|
17
|
-
let errorType = null
|
|
18
|
-
let newRoute = null // wrapper for module routes
|
|
19
|
-
const _allFiles = fileAssets.getActivities()
|
|
20
|
-
let mappedFiles = fileAssets.buildMapTree(_allFiles)
|
|
21
|
-
let menuCreated = false
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* 1- Preparing the router to catch failing navigation error from browser by
|
|
25
|
-
* Redefining the Router push method
|
|
26
|
-
* ref: https://stackoverflow.com/questions/57837758/ navigationduplicated-navigating-to-current-location-search-is-not-allowed
|
|
27
|
-
*/
|
|
28
|
-
const originalPush = Router.prototype.push
|
|
29
|
-
Router.prototype.push = function push(location) {
|
|
30
|
-
return originalPush.call(this, location).catch((err) => err)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Creating 1st route: redirection for none existing route to home(Module)
|
|
34
|
-
_routes.push({
|
|
35
|
-
path: '*',
|
|
36
|
-
redirect: {
|
|
37
|
-
name: '404'
|
|
38
|
-
}
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* 2 - Creating the 2nd route: The App module route
|
|
43
|
-
*/
|
|
44
|
-
// Load all the files in the VIEWS folder
|
|
45
|
-
|
|
46
|
-
const defaultRoute = {
|
|
47
|
-
path: '/',
|
|
48
|
-
component: AppCompViewDisplay,
|
|
49
|
-
children: []
|
|
50
|
-
}
|
|
51
|
-
errorType = false
|
|
52
|
-
|
|
53
|
-
const staticSummary = {
|
|
54
|
-
path: '/menu',
|
|
55
|
-
component: () =>
|
|
56
|
-
import(/* webpackChunkName: "menu" */ `@/views/SummaryView.vue`),
|
|
57
|
-
name: 'menu',
|
|
58
|
-
meta: {
|
|
59
|
-
type: 'page_menu'
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const staticModule = {
|
|
64
|
-
path: '',
|
|
65
|
-
component: () =>
|
|
66
|
-
import(/* webpackChunkName: "home" */ `@/views/ModuleView.vue`),
|
|
67
|
-
name: 'module',
|
|
68
|
-
children: [
|
|
69
|
-
{
|
|
70
|
-
path: 'introduction',
|
|
71
|
-
component: AppCompViewDisplay,
|
|
72
|
-
children: [
|
|
73
|
-
{
|
|
74
|
-
path: 'page-1',
|
|
75
|
-
name: 'introduction',
|
|
76
|
-
component: () =>
|
|
77
|
-
import(/* webpackChunkName: "gpNested" */ `@/module/A02/P01.vue`),
|
|
78
|
-
meta: {
|
|
79
|
-
id: 'P01',
|
|
80
|
-
activity_ref: 'A00',
|
|
81
|
-
type: 'normal',
|
|
82
|
-
parent: {
|
|
83
|
-
_ref: 'P01',
|
|
84
|
-
_path: 'introduction',
|
|
85
|
-
_namedRoute: 'introduction'
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
meta: {
|
|
91
|
-
id: 'A00',
|
|
92
|
-
children: [
|
|
93
|
-
{
|
|
94
|
-
_ref: 'P01',
|
|
95
|
-
_path: 'page-1',
|
|
96
|
-
_namedRoute: 'introduction'
|
|
97
|
-
}
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
path: 'activite-1',
|
|
103
|
-
component: AppCompViewDisplay,
|
|
104
|
-
children: [
|
|
105
|
-
{
|
|
106
|
-
path: 'page-1',
|
|
107
|
-
name: 'activite_1',
|
|
108
|
-
component: () =>
|
|
109
|
-
import(/* webpackChunkName: "gpNested" */ `@/module/A01/P01.vue`),
|
|
110
|
-
meta: {
|
|
111
|
-
id: 'P01',
|
|
112
|
-
activity_ref: 'A01',
|
|
113
|
-
type: 'normal',
|
|
114
|
-
parent: {
|
|
115
|
-
_ref: 'P01',
|
|
116
|
-
_path: 'activite-1',
|
|
117
|
-
_namedRoute: 'activity_1'
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
path: 'page-2',
|
|
123
|
-
name: 'activite_1.page_2',
|
|
124
|
-
component: () =>
|
|
125
|
-
import(/* webpackChunkName: "gpNested" */ `@/module/A01/P02.vue`),
|
|
126
|
-
meta: {
|
|
127
|
-
id: 'P02',
|
|
128
|
-
activity_ref: 'A01',
|
|
129
|
-
type: 'branching',
|
|
130
|
-
parent: {
|
|
131
|
-
_ref: 'P01',
|
|
132
|
-
_path: 'activite-1',
|
|
133
|
-
_namedRoute: 'activity_1'
|
|
134
|
-
},
|
|
135
|
-
children: [
|
|
136
|
-
{
|
|
137
|
-
_ref: 'P02_E01',
|
|
138
|
-
_path: 'branch-1',
|
|
139
|
-
_namedRoute: 'A01.page_2.branching_1.branch_1'
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
_ref: 'P02_E02',
|
|
143
|
-
_path: 'branch-2',
|
|
144
|
-
_namedRoute: 'A01.page_2.branching_1.branch_2'
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
_ref: 'P02_E03',
|
|
148
|
-
_path: 'branch-3',
|
|
149
|
-
_namedRoute: 'A01.page_2.branching_1.branch_3'
|
|
150
|
-
}
|
|
151
|
-
]
|
|
152
|
-
},
|
|
153
|
-
children: [
|
|
154
|
-
{
|
|
155
|
-
path: 'branch-1',
|
|
156
|
-
name: 'A01.page_2.branching_1.branch_1',
|
|
157
|
-
component: () =>
|
|
158
|
-
import(
|
|
159
|
-
/* webpackChunkName: "gpNested" */ `@/module/A01/P02_E01.vue`
|
|
160
|
-
),
|
|
161
|
-
meta: {
|
|
162
|
-
id: 'P02_E01',
|
|
163
|
-
activity_ref: 'A01',
|
|
164
|
-
type: 'branch',
|
|
165
|
-
branching_ref: 'A01.P02.branching_1',
|
|
166
|
-
parent: {
|
|
167
|
-
_ref: 'P02',
|
|
168
|
-
_path: 'activite-1.page-2',
|
|
169
|
-
_namedRoute: 'activity_1.page_2'
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
path: 'branch-2',
|
|
175
|
-
name: 'A01.page_2.branching_1.branch_2',
|
|
176
|
-
component: () =>
|
|
177
|
-
import(
|
|
178
|
-
/* webpackChunkName: "gpNested" */ `@/module/A01/P02_E02.vue`
|
|
179
|
-
),
|
|
180
|
-
meta: {
|
|
181
|
-
id: 'P02_E02',
|
|
182
|
-
activity_ref: 'A01',
|
|
183
|
-
type: 'branch',
|
|
184
|
-
branching_ref: 'A01.P02.branching_1',
|
|
185
|
-
parent: {
|
|
186
|
-
_ref: 'P02',
|
|
187
|
-
_path: 'activite-1.page-2',
|
|
188
|
-
_namedRoute: 'activity_1.page_2'
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
path: 'branch-3',
|
|
194
|
-
name: 'A01.page_2.branching_1.branch_3',
|
|
195
|
-
component: () =>
|
|
196
|
-
import(
|
|
197
|
-
/* webpackChunkName: "gpNested" */ `@/module/A01/P02_E03.vue`
|
|
198
|
-
),
|
|
199
|
-
meta: {
|
|
200
|
-
id: 'P02_E03',
|
|
201
|
-
activity_ref: 'A01',
|
|
202
|
-
type: 'branch',
|
|
203
|
-
branching_ref: 'A01.P02.branching_1',
|
|
204
|
-
parent: {
|
|
205
|
-
_ref: 'P02',
|
|
206
|
-
_path: 'activite-1.page-2',
|
|
207
|
-
_namedRoute: 'activity_1.page_2'
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
]
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
path: 'page-3',
|
|
215
|
-
name: 'activite_1.page_3',
|
|
216
|
-
component: () =>
|
|
217
|
-
import(/* webpackChunkName: "gpNested" */ `@/module/A01/P03.vue`),
|
|
218
|
-
meta: {
|
|
219
|
-
id: 'P03',
|
|
220
|
-
activity_ref: 'A01',
|
|
221
|
-
type: 'normal',
|
|
222
|
-
parent: {
|
|
223
|
-
_ref: 'P01',
|
|
224
|
-
_path: 'activite-1',
|
|
225
|
-
_namedRoute: 'activity_1'
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
],
|
|
230
|
-
meta: {
|
|
231
|
-
id: 'A01',
|
|
232
|
-
children: [
|
|
233
|
-
{
|
|
234
|
-
_ref: 'P01',
|
|
235
|
-
_path: 'page-1',
|
|
236
|
-
_namedRoute: 'activite_1'
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
_ref: 'P02',
|
|
240
|
-
_path: 'page-2',
|
|
241
|
-
_namedRoute: 'activite_1.page_2'
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
_ref: 'P03',
|
|
245
|
-
_path: 'page-3',
|
|
246
|
-
_namedRoute: 'activite_1.page_3'
|
|
247
|
-
}
|
|
248
|
-
]
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
path: 'activite-2',
|
|
253
|
-
component: AppCompViewDisplay,
|
|
254
|
-
children: [
|
|
255
|
-
{
|
|
256
|
-
path: 'page-1',
|
|
257
|
-
name: 'activite_2',
|
|
258
|
-
component: () =>
|
|
259
|
-
import(/* webpackChunkName: "gpNested" */ `@/module/A02/P01.vue`),
|
|
260
|
-
meta: {
|
|
261
|
-
id: 'P01',
|
|
262
|
-
activity_ref: 'A02',
|
|
263
|
-
type: 'normal',
|
|
264
|
-
parent: {
|
|
265
|
-
_ref: 'P01',
|
|
266
|
-
_path: 'activite-2',
|
|
267
|
-
_namedRoute: 'activity_2'
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
],
|
|
272
|
-
meta: {
|
|
273
|
-
id: 'A02',
|
|
274
|
-
children: [
|
|
275
|
-
{
|
|
276
|
-
_ref: 'P01',
|
|
277
|
-
_path: 'page-1',
|
|
278
|
-
_namedRoute: 'activite_2'
|
|
279
|
-
}
|
|
280
|
-
]
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
],
|
|
284
|
-
meta: {
|
|
285
|
-
id: 'mod_00100',
|
|
286
|
-
type: 'normal',
|
|
287
|
-
children: [
|
|
288
|
-
{
|
|
289
|
-
_ref: 'A01',
|
|
290
|
-
_path: 'introduction',
|
|
291
|
-
_namedRoute: 'introduction'
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
_ref: 'A01',
|
|
295
|
-
_path: 'activite-1',
|
|
296
|
-
_namedRoute: 'activite_1'
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
_ref: 'A02',
|
|
300
|
-
_path: 'activite-2',
|
|
301
|
-
_namedRoute: 'activite_2'
|
|
302
|
-
}
|
|
303
|
-
]
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
defaultRoute.children.push(staticModule)
|
|
307
|
-
defaultRoute.children.push(staticSummary)
|
|
308
|
-
if (!errorType) {
|
|
309
|
-
// add the newRoute to the routes array
|
|
310
|
-
_routes.push(defaultRoute)
|
|
311
|
-
} else {
|
|
312
|
-
// create Route for error non-existing files
|
|
313
|
-
_routes.push({
|
|
314
|
-
path: '/',
|
|
315
|
-
component: () =>
|
|
316
|
-
import(
|
|
317
|
-
/* webpackChunkName: "gpNested" */ `./components/AppBaseErrorDisplay.vue`
|
|
318
|
-
),
|
|
319
|
-
props: {
|
|
320
|
-
errorMessage: errorType
|
|
321
|
-
}
|
|
322
|
-
})
|
|
323
|
-
}
|
|
324
|
-
// Routes for errors : 404
|
|
325
|
-
_routes.push({
|
|
326
|
-
path: '/404',
|
|
327
|
-
name: '404',
|
|
328
|
-
component: () =>
|
|
329
|
-
import(
|
|
330
|
-
/* webpackChunkName: "gpNested" */ `./components/AppBaseErrorDisplay.vue`
|
|
331
|
-
),
|
|
332
|
-
props: {
|
|
333
|
-
errorMessage: '404'
|
|
334
|
-
}
|
|
335
|
-
})
|
|
336
|
-
|
|
337
|
-
// Add register Module pages to store
|
|
338
|
-
store.state.thisModule.activities = mappedFiles
|
|
339
|
-
|
|
340
|
-
// exporting routes object
|
|
341
|
-
export default {
|
|
342
|
-
base: process.env.BASE_URL,
|
|
343
|
-
routes: [..._routes]
|
|
344
|
-
}
|
package/vue.config.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
//const path = require('path')
|
|
2
|
-
module.exports = {
|
|
3
|
-
chainWebpack: (config) => {
|
|
4
|
-
config.module
|
|
5
|
-
.rule('vue')
|
|
6
|
-
.use('vue-loader')
|
|
7
|
-
.loader('vue-loader')
|
|
8
|
-
.tap((options) => {
|
|
9
|
-
options['transformAssetUrls'] = {
|
|
10
|
-
'b-embend': ['src', 'poster'],
|
|
11
|
-
video: ['src', 'poster'],
|
|
12
|
-
source: ['src'],
|
|
13
|
-
track: 'src',
|
|
14
|
-
img: ['src'],
|
|
15
|
-
image: 'xlink:href',
|
|
16
|
-
'b-img': 'src',
|
|
17
|
-
'b-img-lazy': ['src', 'blank-src'],
|
|
18
|
-
'b-card': 'img-src',
|
|
19
|
-
'b-card-img': 'src',
|
|
20
|
-
'b-card-img-lazy': ['src', 'blank-src'],
|
|
21
|
-
'b-carousel-slide': 'img-src'
|
|
22
|
-
}
|
|
23
|
-
return options
|
|
24
|
-
})
|
|
25
|
-
//.alias.set('rootscr', path.resolve(__dirname, 'src'))
|
|
26
|
-
//config.resolve.alias.set('@rootsrc', path.resolve(__dirname, '../src'))
|
|
27
|
-
|
|
28
|
-
// adjusting the media rule to include vtt files
|
|
29
|
-
config.module
|
|
30
|
-
.rule('media')
|
|
31
|
-
.test(/\.(vtt|mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/)
|
|
32
|
-
//adjusted rule for pdf files
|
|
33
|
-
config.module
|
|
34
|
-
.rule('pdf')
|
|
35
|
-
.test(/\.pdf$/)
|
|
36
|
-
.use('file-loader')
|
|
37
|
-
.loader('file-loader')
|
|
38
|
-
.options({
|
|
39
|
-
name: 'docs/[name].[hash:8].[ext]'
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
// adjusted rule for doc files
|
|
43
|
-
config.module
|
|
44
|
-
.rule('doc')
|
|
45
|
-
.test(/\.(doc|docx)$/)
|
|
46
|
-
.use('file-loader')
|
|
47
|
-
.loader('file-loader')
|
|
48
|
-
.options({
|
|
49
|
-
name: 'docs/[name].[hash:8].[ext]'
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
// adjusted rule for excel files
|
|
53
|
-
config.module
|
|
54
|
-
.rule('xlsx')
|
|
55
|
-
.test(/\.(csv|xlsx|xls)$/)
|
|
56
|
-
.use('file-loader')
|
|
57
|
-
.loader('file-loader')
|
|
58
|
-
.options({
|
|
59
|
-
name: 'docs/[name].[hash:8].[ext]'
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
// adjusted rule for txt files
|
|
63
|
-
config.module
|
|
64
|
-
.rule('txt')
|
|
65
|
-
.test(/\.(txt)$/)
|
|
66
|
-
.use('file-loader')
|
|
67
|
-
.loader('file-loader')
|
|
68
|
-
.options({
|
|
69
|
-
name: 'docs/[name].[hash:8].[ext]'
|
|
70
|
-
})
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
//production config path
|
|
74
|
-
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
|
|
75
|
-
pluginOptions: {
|
|
76
|
-
i18n: {
|
|
77
|
-
locale: 'fr',
|
|
78
|
-
fallbackLocale: 'fr',
|
|
79
|
-
localeDir: 'locales',
|
|
80
|
-
enableInSFC: false
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|