aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components
diff options
context:
space:
mode:
authorZero~Informatique2020-04-28 03:47:39 +0200
committerZero~Informatique2020-04-28 03:47:50 +0200
commitccecfd9421f4550a71134cd46e1388e486f8c564 (patch)
tree9711ed24320150d24d85a124de3fd6177052eeb0 /viewer/src/components
parent113bff3c4dcc1976f24df16d4224e1871e665ae0 (diff)
downloadldgallery-ccecfd9421f4550a71134cd46e1388e486f8c564.tar.gz
viewer: global formatting unification
Diffstat (limited to 'viewer/src/components')
-rw-r--r--viewer/src/components/index.ts30
1 files changed, 15 insertions, 15 deletions
diff --git a/viewer/src/components/index.ts b/viewer/src/components/index.ts
index ef55489..559000e 100644
--- a/viewer/src/components/index.ts
+++ b/viewer/src/components/index.ts
@@ -17,25 +17,25 @@
17-- along with this program. If not, see <https://www.gnu.org/licenses/>. 17-- along with this program. If not, see <https://www.gnu.org/licenses/>.
18*/ 18*/
19 19
20import Vue from 'vue' 20import Vue from "vue"
21 21
22const requireComponent = require.context( 22const requireComponent = require.context(
23 '@/components', 23 "@/components",
24 false, // Whether or not to look in subfolders 24 false, // Whether or not to look in subfolders
25 // The regular expression used to match base component filenames 25 // The regular expression used to match base component filenames
26 /Ld[A-Z]\w+\.vue$/ 26 /Ld[A-Z]\w+\.vue$/
27) 27)
28 28
29requireComponent.keys().forEach(fileName => { 29requireComponent.keys().forEach(fileName => {
30 const componentConfig = requireComponent(fileName) 30 const componentConfig = requireComponent(fileName)
31 const componentName = fileName.split('/').pop()!.replace(/\.vue$/, ''); 31 const componentName = fileName.split("/").pop()!.replace(/\.vue$/, "");
32 32
33 // Register component globally 33 // Register component globally
34 Vue.component( 34 Vue.component(
35 componentName, 35 componentName,
36 // Look for the component options on `.default`, which will 36 // Look for the component options on `.default`, which will
37 // exist if the component was exported with `export default`, 37 // exist if the component was exported with `export default`,
38 // otherwise fall back to module's root. 38 // otherwise fall back to module's root.
39 componentConfig.default ?? componentConfig 39 componentConfig.default ?? componentConfig
40 ) 40 )
41}) 41})