diff options
author | Zero~Informatique | 2020-06-20 16:50:49 +0200 |
---|---|---|
committer | OzoneGrif | 2020-06-28 14:11:13 +0200 |
commit | 170d7a61f720ece9dc4b347b19f5a8213f1d8984 (patch) | |
tree | 3a7af0595faea4a98437f8f73b3172529bda3a1d /viewer/src/components/index.ts | |
parent | 06355c9cebce469d3d827d48043387144c2458a5 (diff) | |
download | ldgallery-170d7a61f720ece9dc4b347b19f5a8213f1d8984.tar.gz |
viewer: prettier formatting based on eslint-prettier plugin
Diffstat (limited to 'viewer/src/components/index.ts')
-rw-r--r-- | viewer/src/components/index.ts | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/viewer/src/components/index.ts b/viewer/src/components/index.ts index 043087d..f34eea1 100644 --- a/viewer/src/components/index.ts +++ b/viewer/src/components/index.ts | |||
@@ -17,18 +17,21 @@ | |||
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 | ||
20 | import Vue from "vue" | 20 | import Vue from "vue"; |
21 | 21 | ||
22 | const requireComponent = require.context( | 22 | const requireComponent = require.context( |
23 | "@/components", | 23 | "@/components", |
24 | true, // Whether or not to look in subfolders | 24 | true, // 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 | ||
29 | requireComponent.keys().forEach(fileName => { | 29 | requireComponent.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 |
32 | .split("/") | ||
33 | .pop()! | ||
34 | .replace(/\.vue$/, ""); | ||
32 | 35 | ||
33 | // Register component globally | 36 | // Register component globally |
34 | Vue.component( | 37 | Vue.component( |
@@ -37,5 +40,5 @@ requireComponent.keys().forEach(fileName => { | |||
37 | // exist if the component was exported with `export default`, | 40 | // exist if the component was exported with `export default`, |
38 | // otherwise fall back to module's root. | 41 | // otherwise fall back to module's root. |
39 | componentConfig.default ?? componentConfig | 42 | componentConfig.default ?? componentConfig |
40 | ) | 43 | ); |
41 | }) | 44 | }); |