@abi-software/scaffoldvuer 0.1.1 → 0.1.5-1.beta.0

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.
@@ -0,0 +1,556 @@
1
+ <template>
2
+ <div
3
+ class="traditional-location"
4
+ :class="{ open: drawerOpen, close: !drawerOpen }"
5
+ >
6
+ <div class="traditional-container">
7
+ <el-row>
8
+ <el-col :span="12">
9
+ <div class="regions-display-text">
10
+ Regions
11
+ </div>
12
+ </el-col>
13
+ <el-col :span="12">
14
+ <el-checkbox
15
+ v-model="checkAll"
16
+ class="all-checkbox"
17
+ :indeterminate="isIndeterminate"
18
+ @change="handleCheckAllChange"
19
+ >
20
+ Display all
21
+ </el-checkbox>
22
+ </el-col>
23
+ </el-row>
24
+ <el-checkbox-group
25
+ v-model="checkedItems"
26
+ size="small"
27
+ class="checkbox-group"
28
+ @change="handleCheckedItemsChange"
29
+ >
30
+ <div class="checkbox-group-inner">
31
+ <el-row
32
+ v-for="item in sortedPrimitiveGroups"
33
+ :key="item"
34
+ :label="item"
35
+ >
36
+ <div class="checkbox-container">
37
+ <el-checkbox
38
+ class="my-checkbox"
39
+ :label="item"
40
+ :checked="true"
41
+ :class="{ activeItem: activeRegion === item,
42
+ hoverItem: hoverRegion === item }"
43
+ @click.native="itemClicked(item, $event)"
44
+ @change="visibilityToggle(item, $event)"
45
+ @mouseover.native="checkboxHover(item)"
46
+ >
47
+ <el-color-picker
48
+ :class="{ 'show-picker' : showColourPicker }"
49
+ :value="getColour(item)"
50
+ size="small"
51
+ :popper-class="myPopperClass"
52
+ @change="setColour(item, $event)"
53
+ />
54
+ {{ item }}
55
+ </el-checkbox>
56
+ </div>
57
+ </el-row>
58
+ </div>
59
+ </el-checkbox-group>
60
+ </div>
61
+ <div
62
+ class="drawer-button"
63
+ :class="{ open: drawerOpen, close: !drawerOpen }"
64
+ @click="toggleDrawer"
65
+ >
66
+ <i class="el-icon-arrow-left" />
67
+ </div>
68
+ </div>
69
+ </template>
70
+
71
+ <script>
72
+ /* eslint-disable no-alert, no-console */
73
+ import Vue from "vue";
74
+ import { Checkbox, CheckboxGroup, ColorPicker, Row } from "element-ui";
75
+ import lang from "element-ui/lib/locale/lang/en";
76
+ import locale from "element-ui/lib/locale";
77
+
78
+ const orderBy = require("lodash/orderBy");
79
+ const uniq = require("lodash/uniq");
80
+ locale.use(lang);
81
+ Vue.use(Checkbox);
82
+ Vue.use(CheckboxGroup);
83
+ Vue.use(ColorPicker);
84
+ Vue.use(Row);
85
+
86
+ /**
87
+ * A vue component for toggling visibility of various regions.
88
+ */
89
+ export default {
90
+ name: "TraditionalControls",
91
+ props: {
92
+ /**
93
+ * @ignore
94
+ */
95
+ module: {
96
+ type: Object,
97
+ default: undefined
98
+ },
99
+ /**
100
+ * Enable/disable colour picker
101
+ */
102
+ showColourPicker: Boolean
103
+ },
104
+ data: function() {
105
+ return {
106
+ checkAll: true,
107
+ isIndeterminate: false,
108
+ checkedItems: [],
109
+ sortedPrimitiveGroups: [],
110
+ activeRegion: "",
111
+ hoverRegion: "",
112
+ myPopperClass: "hide-scaffold-colour-popup",
113
+ drawerOpen: true
114
+ };
115
+ },
116
+ watch: {
117
+ showColourPicker: {
118
+ immediate: true,
119
+ handler: function() {
120
+ if (this.showColourPicker) this.myPopperClass = "showPicker";
121
+ else this.myPopperClass = "hide-scaffold-colour-popup";
122
+ }
123
+ }
124
+ },
125
+ created: function() {
126
+ let tmpArray = this.module.sceneData.geometries.concat(
127
+ this.module.sceneData.lines
128
+ );
129
+ tmpArray = tmpArray.concat(this.module.sceneData.glyphsets);
130
+ tmpArray = uniq(tmpArray.concat(this.module.sceneData.pointset));
131
+ this.sortedPrimitiveGroups = orderBy(tmpArray);
132
+ this.module.addOrganPartAddedCallback(this.organsAdded);
133
+ this.module.graphicsHighlight.selectColour = 0x444444;
134
+ },
135
+ destroyed: function() {
136
+ this.sortedPrimitiveGroups = undefined;
137
+ },
138
+ methods: {
139
+ /**
140
+ * This is called when a new organ is read into the scene.
141
+ */
142
+ organsAdded: function(name) {
143
+ if (name && name != "") {
144
+ let tmpArray = uniq(this.sortedPrimitiveGroups.concat([name]));
145
+ tmpArray = orderBy(tmpArray);
146
+ const index = tmpArray.indexOf(undefined);
147
+ if (index > -1) {
148
+ tmpArray.splice(index, 1);
149
+ }
150
+ this.sortedPrimitiveGroups = tmpArray;
151
+ }
152
+ },
153
+ /**
154
+ * Select a region by its name.
155
+ */
156
+ changeActiveByName: function(name) {
157
+ let targetObject = this.getFirstZincObjectWithGroupName(name);
158
+ if (targetObject && targetObject.getVisibility()) {
159
+ this.activeRegion = name;
160
+ /**
161
+ * Triggers when an item has been selected.
162
+ *
163
+ * @property {object} target selected object.
164
+ */
165
+ this.$emit("object-selected", targetObject);
166
+ } else {
167
+ this.removeActive();
168
+ }
169
+ this.removeHover();
170
+ },
171
+ /**
172
+ * Hover a region by its name.
173
+ */
174
+ changeHoverByName: function(name) {
175
+ let targetObject = this.getFirstZincObjectWithGroupName(name);
176
+ if (targetObject) {
177
+ this.hoverRegion = name;
178
+ /**
179
+ * Triggers when an item has been hovered over.
180
+ *
181
+ * @property {object} target hovered object.
182
+ */
183
+ this.$emit("object-hovered", targetObject);
184
+ } else {
185
+ this.removeHover();
186
+ }
187
+ },
188
+ /**
189
+ * Unselect the current selected region.
190
+ */
191
+ removeActive: function() {
192
+ this.activeRegion = "";
193
+ this.$emit("object-selected", undefined);
194
+ },
195
+ /**
196
+ * Unselect the current hover region.
197
+ */
198
+ removeHover: function() {
199
+ this.hoverRegion = "";
200
+ this.$emit("object-hovered", undefined);
201
+ },
202
+ /**
203
+ * Reset the controls.
204
+ */
205
+ clear: function() {
206
+ this.sortedPrimitiveGroups = [];
207
+ this.checkedItems = [];
208
+ this.checkAll = true;
209
+ this.isIndeterminate = false;
210
+ this.activeRegion = "";
211
+ this.hoverRegion = "";
212
+ this.$emit("object-selected", undefined);
213
+ },
214
+ getFirstZincObjectWithGroupName: function(name) {
215
+ if (this.module && this.module.scene) {
216
+ let array = this.module.scene.findGeometriesWithGroupName(name);
217
+ if (array.length > 0) return array[0];
218
+ array = this.module.scene.findGlyphsetsWithGroupName(name);
219
+ if (array.length > 0) return array[0];
220
+ array = this.module.scene.findLinesWithGroupName(name);
221
+ if (array.length > 0) return array[0];
222
+ array = this.module.scene.findPointsetsWithGroupName(name);
223
+ if (array.length > 0) return array[0];
224
+ }
225
+ return undefined;
226
+ },
227
+ getColour: function(name) {
228
+ let graphic = this.getFirstZincObjectWithGroupName(name);
229
+ if (graphic) {
230
+ let hex = graphic.getColourHex();
231
+ if (hex) return "#" + hex;
232
+ }
233
+ return "#FFFFFF";
234
+ },
235
+ setColour: function(name, value) {
236
+ let graphic = this.getFirstZincObjectWithGroupName(name);
237
+ if (graphic) {
238
+ let hexString = value.replace("#", "0x");
239
+ graphic.setColourHex(hexString);
240
+ }
241
+ },
242
+ checkboxHover: function(name) {
243
+ this.changeHoverByName(name);
244
+ },
245
+ itemClicked: function(name, event) {
246
+ if (
247
+ !(
248
+ event.target.classList.contains("el-checkbox__inner") ||
249
+ event.target.classList.contains("el-checkbox__original")
250
+ )
251
+ ) {
252
+ this.changeActiveByName(name);
253
+ event.preventDefault();
254
+ }
255
+ },
256
+ handleCheckedItemsChange: function() {
257
+ let unnamed = this.checkedItems.includes(undefined) ? true: false;
258
+ let checkedCount = this.checkedItems.length;
259
+ if (unnamed)
260
+ checkedCount--;
261
+ this.checkAll = checkedCount === this.sortedPrimitiveGroups.length;
262
+ this.isIndeterminate =
263
+ checkedCount > 0 && checkedCount < this.sortedPrimitiveGroups.length;
264
+ },
265
+ handleCheckAllChange(val) {
266
+ this.checkedItems = val ? [...this.sortedPrimitiveGroups] : [];
267
+ this.isIndeterminate = false;
268
+ for (let i = 0; i < this.sortedPrimitiveGroups.length; i++) {
269
+ this.visibilityToggle(this.sortedPrimitiveGroups[i], this.checkAll);
270
+ }
271
+ },
272
+ viewAll: function() {
273
+ this.module.viewAll();
274
+ },
275
+ visibilityToggle: function(item, event) {
276
+ this.module.changeOrganPartsVisibility(item, event);
277
+ if (event == false) {
278
+ if (this.activeRegion === item) {
279
+ this.removeActive();
280
+ }
281
+ if (this.hoverRegion === item) {
282
+ this.removeHover();
283
+ }
284
+ }
285
+ },
286
+ toggleDrawer: function() {
287
+ this.drawerOpen = !this.drawerOpen;
288
+ this.$emit("drawer-toggled", this.drawerOpen);
289
+ },
290
+ getState: function() {
291
+ if (this.checkAll) {
292
+ return { checkAll: true };
293
+ }
294
+ let checkedItems = [...this.checkedItems];
295
+ const index = checkedItems.indexOf(undefined);
296
+ if (index > -1) {
297
+ checkedItems.splice(index, 1);
298
+ }
299
+ return { checkedItems: checkedItems };
300
+ },
301
+ setState: function(state) {
302
+ if (state) {
303
+ if (state.checkAll) {
304
+ this.checkedItems = [...this.sortedPrimitiveGroups];
305
+ for (let i = 0; i < this.sortedPrimitiveGroups.length; i++) {
306
+ this.module.changeOrganPartsVisibility(
307
+ this.sortedPrimitiveGroups[i],
308
+ true
309
+ );
310
+ }
311
+ } else if (state.checkedItems) {
312
+ this.checkedItems = [...state.checkedItems];
313
+ for (let i = 0; i < this.sortedPrimitiveGroups.length; i++) {
314
+
315
+ let visible = this.checkedItems.includes(
316
+ this.sortedPrimitiveGroups[i]);
317
+ this.module.changeOrganPartsVisibility(
318
+ this.sortedPrimitiveGroups[i],
319
+ visible
320
+ );
321
+ }
322
+ }
323
+ }
324
+ this.handleCheckedItemsChange();
325
+ }
326
+ }
327
+ };
328
+ </script>
329
+
330
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
331
+ <style scoped lang="scss">
332
+ @import "~element-ui/packages/theme-chalk/src/checkbox";
333
+ @import "~element-ui/packages/theme-chalk/src/checkbox-group";
334
+ @import "~element-ui/packages/theme-chalk/src/color-picker";
335
+ @import "~element-ui/packages/theme-chalk/src/row";
336
+
337
+ .checkbox-container {
338
+ display: flex;
339
+ cursor: pointer;
340
+ }
341
+
342
+ .traditional-location {
343
+ position: absolute;
344
+ bottom: 0px;
345
+ transition: all 1s ease;
346
+
347
+ &:focus{
348
+ outline: none;
349
+ }
350
+ &.open {
351
+ left: 0px;
352
+ .traditional-container {
353
+ opacity: 1;
354
+ }
355
+ }
356
+ &.close {
357
+ left: -298px;
358
+ .traditional-container {
359
+ pointer-events:none;
360
+ opacity: 0;
361
+ }
362
+ }
363
+ }
364
+
365
+ .traditional-container {
366
+ transition: all 1s ease;
367
+ float: left;
368
+ padding-left: 16px;
369
+ padding-right: 18px;
370
+ max-height: calc(100% - 154px);
371
+ text-align: left;
372
+ overflow: none;
373
+ border: 1px solid rgb(220, 223, 230);
374
+ padding-top: 7px;
375
+ padding-bottom: 16px;
376
+ background: #ffffff;
377
+ }
378
+
379
+ .regions-display-text {
380
+ width: 59px;
381
+ height: 20px;
382
+ color: rgb(48, 49, 51);
383
+ font-size: 14px;
384
+ font-weight: normal;
385
+ line-height: 20px;
386
+ margin-left: 8px;
387
+ }
388
+
389
+ .all-checkbox {
390
+ float: right;
391
+ }
392
+
393
+ .checkbox-group {
394
+ width: 260px;
395
+ border: 1px solid rgb(144, 147, 153);
396
+ border-radius: 4px;
397
+ background: #ffffff;
398
+ margin-top: 6px;
399
+ }
400
+
401
+ .checkbox-group-inner {
402
+ padding: 18px;
403
+ max-height: 240px;
404
+ min-height: 130px;
405
+ overflow: auto;
406
+ scrollbar-color: #c0c4cc rgba(1, 1, 1, 0);
407
+ scrollbar-width: thin;
408
+
409
+ &::-webkit-scrollbar {
410
+ width: 4px;
411
+ }
412
+
413
+ &::-webkit-scrollbar-thumb {
414
+ border-radius: 10px;
415
+ box-shadow: inset 0 0 6px #c0c4cc;
416
+ }
417
+ }
418
+
419
+ ::v-deep .el-checkbox__input {
420
+ &.is-indeterminate, &.is-checked {
421
+ .el-checkbox__inner {
422
+ background-color: $app-primary-color;
423
+ border-color: $app-primary-color;
424
+ }
425
+ }
426
+ }
427
+
428
+ ::v-deep .el-color-picker__color {
429
+ border: 1px solid $app-primary-color;
430
+ }
431
+
432
+ ::v-deep .el-checkbox__label {
433
+ padding-left: 5px;
434
+ color: $app-primary-color !important;
435
+ font-size: 12px;
436
+ font-weight: 500;
437
+ letter-spacing: 0px;
438
+ line-height: 14px;
439
+ }
440
+
441
+ .activeItem {
442
+ background-color: #bbb !important;
443
+ }
444
+
445
+ .my-checkbox {
446
+ background-color: #fff;
447
+ width: 100%;
448
+
449
+ ::v-deep .el-color-picker {
450
+ height: 16px !important;
451
+ top: 3px;
452
+ }
453
+
454
+ ::v-deep .el-color-picker__trigger {
455
+ margin-left: 8px;
456
+ margin-right: 8px;
457
+ padding: 0px;
458
+ height: 16px;
459
+ width: 16px;
460
+ border: 0px;
461
+ }
462
+
463
+ }
464
+
465
+ .hoverItem {
466
+ background-color: #eee !important;
467
+ }
468
+
469
+ ::v-deep .el-color-picker__icon {
470
+ &.el-icon-arrow-down {
471
+ display: none;
472
+ }
473
+ }
474
+
475
+ ::v-deep .show-picker {
476
+ .el-color-picker__icon {
477
+ &.el-icon-arrow-down {
478
+ display: block;
479
+ }
480
+ }
481
+ }
482
+
483
+ ::v-deep .my-drawer {
484
+ background: rgba(0, 0, 0, 0);
485
+ box-shadow: none;
486
+ }
487
+
488
+ .drawer {
489
+ ::v-deep .el-drawer:focus {
490
+ outline: none;
491
+ }
492
+ }
493
+
494
+ .open-drawer {
495
+ width: 20px;
496
+ height: 40px;
497
+ z-index: 8;
498
+ position: absolute;
499
+ left: 0px;
500
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
501
+ border: solid 1px #e4e7ed;
502
+ background-color: #f7faff;
503
+ text-align: center;
504
+ vertical-align: middle;
505
+ cursor: pointer;
506
+ pointer-events: auto;
507
+ }
508
+
509
+ .drawer-button {
510
+ float: left;
511
+ width: 20px;
512
+ height: 40px;
513
+ z-index: 8;
514
+ margin-top: calc(50% - 52px);
515
+ border: solid 1px #e4e7ed;
516
+ border-left: 0;
517
+ background-color: #ffffff;
518
+ text-align: center;
519
+ vertical-align: middle;
520
+ cursor: pointer;
521
+ pointer-events: auto;
522
+ }
523
+
524
+ .drawer-button {
525
+ i {
526
+ margin-top: 12px;
527
+ color: $app-primary-color;
528
+ transition-delay: 0.9s;
529
+ }
530
+ &.open {
531
+ i {
532
+ transform: rotate(0deg) scaleY(2.5);
533
+ }
534
+ }
535
+ &.close {
536
+ i {
537
+ transform: rotate(180deg) scaleY(2.5);
538
+ }
539
+ }
540
+ }
541
+
542
+ .drawer-button.open i {
543
+ transform: rotate(0deg) scaleY(2.5);
544
+ }
545
+
546
+ .drawer-button.close i {
547
+ transform: rotate(180deg) scaleY(2.5);
548
+ }
549
+ </style>
550
+
551
+ <style>
552
+ .hide-scaffold-colour-popup {
553
+ display: none;
554
+ }
555
+ </style>
556
+
@@ -1,15 +1,7 @@
1
1
  // The Vue build version to load with the `import` command
2
2
  // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3
- import Vue from "vue";
4
3
  import ScaffoldVuer from "./ScaffoldVuer.vue";
5
4
 
6
- const Components = {
7
- ScaffoldVuer
8
- };
9
-
10
- Object.keys(Components).forEach(name => {
11
- Vue.component(name, Components[name]);
12
- });
13
-
14
- export default Components;
15
-
5
+ export {
6
+ ScaffoldVuer
7
+ };
@@ -0,0 +1,12 @@
1
+ {
2
+ "type": "service_account",
3
+ "project_id": "scaffold-models-1598402284168",
4
+ "private_key_id": "d97f27e0d164aa69fb8995342447407b1a8af037",
5
+ "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCSU0/CnYgiP254\ntvAZzosYTwFZ69KqZYNfWOjWRRB5wKr+itLGpi25WcO2wR4YtXiTXk9htaYd9hSM\n90LEH5+aqhvMovmDltpLRRfL0qg4jf/AlmL11lmbj715Rsko6ADD1fQfnl5leYLb\nikbkCBCdedAOZmC0Px9RuMV+5N440dE7PejBc6UGGCouTHzXeuT/8KigBTKLNk3x\nLu1v0Aw07iJLKAXQKGNKKxRuBVoc/WcVRqTfs7HWQcxFYpIg4MmRoa8MKJujZPwR\nCLRHktCo4Sip32By7LFapjkhjV0ImUq+B/gOctBIt/MC445lxaW8Z6iC0jPOhSRi\nRRjhY2+3AgMBAAECggEAQQxEMtHxCLiGFafNiMtmzkGg6iaJmjJSenp913MQZe+e\nlFWGacTKItGizYWAKZ/SoECWrWshE8SnUhtBVQpx20Gv5gK1RSg0lq16bKOTIMEP\nZr/z8jF92EfIBTfQiRzJ6kUcp0mx0Q55e7s21Hw5VqgmM6CTcM120M+BDG4V08/W\nSqsmtYRcitUeiolQCVPxx0AAeqS8ysZWPBen1tNY9HfZ+2TBkmDf+G7anZO72UTy\n3GRIpCUr4EaopftCwsk6hwbxmsJCFLBMmWobhdeb3k6Srwg5FIQ84xR2cyW0fPHm\nE/kjFKoUomXTiaBhNndLHnG6eh3G2Ml96FIRQlzgAQKBgQDDpJhANedrwzAq/J7r\ngUFrjaEfQn65khCsdgbeBV5AsfNq3BVCDcsaK9ieqX7HgDFwx5bGBQerH8GjQjFD\nHNcz/ZCpsk2CzDjhLLgxzd48NVlq606kMg9/YqaJ96U7H5dUS40f0JbrcWZ+dG4q\n/ZS4jMM61u0zUfmiN5a1r//YAQKBgQC/d71Ig9vHz5a9he3LqMCFR+gZPNy2hYSX\ndcwhosI3IuC4frUoQToZdsPADI7s5hK7Ob+AlWokJ3YeCmqTYMr96ayHA6yfw99r\nIxmeMKP1G94OShO/kX/Y9mw+JiCDUSXJef2n8zrMrDSHdAusa14YYp3vfeI3fPI4\n4opP0pgHtwKBgQCWt95y2RQHeL9K3oKve0wix2Ew69EktNoTgnmX4RrTTEPyNspJ\nsMaeyth+oqUAnEl6UMhelNFri3NpijzZLwa7DsS7dpkwApRvJDxiYe6rA453R/+1\njrtRr3YNI7Mu8Q9r6Sg3MkKR7zK+iIO2qtQ/uHFOivUBbE2cIqcAIS5AAQKBgCPS\nHgqECMlAEB6TAOMaRjJpOoYGOfC32A+SDUe5sIYqM0qxAelvEpSTAJpcfxzZCmYW\nrro6uenbrCCAqGG8OR356rozuMcHGTRtE6zhwrrnpMqdl0Y+zWFk8OlLrseClgQ0\nm30hZz3Fdepljo2KZMdBI/UbYwgoixSTZXb7mk/PAoGASN0HgtU9EhYsfBZYGqL7\nh3rUVOQBOfnhx3+3g03pgnDZtb2YRH1izuTH6Ak0UnMNtZLJqCopHfmZAZmYmVeD\nnpDz9B9nJF0MM0JRYdKEOXzp+HsL8zovt+sKxYeRXq2l4oxJiqIpeLvhvNeHURnB\n10Rl+BuUU2qmilM3kuWIA48=\n-----END PRIVATE KEY-----\n",
6
+ "client_email": "scaffoldvuer@scaffold-models-1598402284168.iam.gserviceaccount.com",
7
+ "client_id": "112229511591019595252",
8
+ "auth_uri": "https://accounts.google.com/o/oauth2/auth",
9
+ "token_uri": "https://oauth2.googleapis.com/token",
10
+ "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
11
+ "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/scaffoldvuer%40scaffold-models-1598402284168.iam.gserviceaccount.com"
12
+ }
package/src/main.js CHANGED
@@ -1,8 +1,14 @@
1
1
  import Vue from 'vue'
2
+ import VueRouter from 'vue-router'
2
3
  import App from './App.vue'
3
4
 
4
5
  Vue.config.productionTip = false
6
+ Vue.use(VueRouter)
7
+
8
+ const router = new VueRouter({
9
+ })
5
10
 
6
11
  new Vue({
12
+ router,
7
13
  render: h => h(App),
8
14
  }).$mount('#app')
@@ -0,0 +1,22 @@
1
+ module.exports = {
2
+ // set your styleguidist configuration here
3
+ title: 'Scaffoldvuer API reference',
4
+ components: 'src/components/ScaffoldVuer.vue',
5
+ // defaultExample: true,
6
+ // sections: [
7
+ // {
8
+ // name: 'First Section',
9
+ // components: 'src/components/**/[A-Z]*.vue'
10
+ // }
11
+ // ],
12
+ // webpackConfig: {
13
+ // // custom config goes here
14
+ // },
15
+ exampleMode: 'expand',
16
+ copyCodeButton: true,
17
+ ribbon: {
18
+ url: 'https://github.com/ABI-Software/scaffoldvuer',
19
+ text: 'Github Page'
20
+ },
21
+ styleguideDir: 'docs'
22
+ }
package/vue.config.js CHANGED
@@ -1,11 +1,38 @@
1
+ const nodeExternals = require('webpack-node-externals');
2
+
1
3
  module.exports = {
2
- chainWebpack: config => {
3
- // GraphQL Loader
4
- config.module
5
- .rule('sahder')
6
- .test(/\.(vs|fs)$/i)
7
- .use('raw-loader')
8
- .loader('raw-loader')
9
- .end()
4
+ configureWebpack: config => {
5
+ if(process.env.NODE_ENV === 'production') {
6
+ config.externals = [ nodeExternals({allowlist: [/^physiomeportal/,]}) ];
10
7
  }
11
- }
8
+ },
9
+ chainWebpack: config => {
10
+ // GraphQL Loader
11
+ config.module
12
+ .rule('shader')
13
+ .test(/\.(vs|fs)$/i)
14
+ .use('raw-loader')
15
+ .loader('raw-loader')
16
+ .end()
17
+ const fontsRule = config.module.rule('fonts')
18
+ fontsRule.uses.clear()
19
+ config.module
20
+ .rule('fonts')
21
+ .test(/\.(ttf|otf|eot|woff|woff2)$/)
22
+ .use('base64-inline-loader')
23
+ .loader('base64-inline-loader')
24
+ .tap(options => {
25
+ // modify the options...
26
+ return options
27
+ })
28
+ .end()
29
+ },
30
+ css: {
31
+ //Import variables into all stylesheets.
32
+ loaderOptions: {
33
+ sass: {
34
+ prependData: `@import '@/assets/styles';`
35
+ }
36
+ }
37
+ }
38
+ }
@@ -1 +0,0 @@
1
- #app,.scaffold-container[data-v-151ed939]{height:100%}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;width:100%;position:absolute}