Skip to content

Commit 10e4da3

Browse files
committed
Separate folder for JSON configs
1 parent fc654b6 commit 10e4da3

File tree

23 files changed

+16
-47
lines changed

23 files changed

+16
-47
lines changed

src/client/components/main_layout/InstancePage.stories.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/client/containers/SemanticPortal.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import {
5555
from '../helpers/helpers'
5656

5757
// ** Generate portal configuration based on JSON configs **
58-
import portalConfig from '../configs/portalConfig.json'
58+
import portalConfig from '../../configs/portalConfig.json'
5959
await processPortalConfig(portalConfig)
6060
const {
6161
portalID,
@@ -71,9 +71,9 @@ const perspectiveConfigOnlyInfoPages = await createPerspectiveConfigOnlyInfoPage
7171
portalID,
7272
onlyInstancePagePerspectives: perspectives.onlyInstancePages
7373
})
74-
const apexChartsConfig = await import(`../configs/${portalID}/ApexCharts/ApexChartsConfig`)
75-
const leafletConfig = await import(`../configs/${portalID}/Leaflet/LeafletConfig`)
76-
const networkConfig = await import(`../configs/${portalID}/Cytoscape.js/NetworkConfig`)
74+
const apexChartsConfig = await import(`../library_configs/${portalID}/ApexCharts/ApexChartsConfig`)
75+
const leafletConfig = await import(`../library_configs/${portalID}/Leaflet/LeafletConfig`)
76+
const networkConfig = await import(`../library_configs/${portalID}/Cytoscape.js/NetworkConfig`)
7777
// ** portal configuration end **
7878

7979
// ** Import general components **

src/client/epics/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import {
5151
updateKnowledgeGraphMetadata,
5252
fetchGeoJSONLayersFailed
5353
} from '../actions'
54-
import portalConfig from '../configs/portalConfig.json'
54+
import portalConfig from '../../configs/portalConfig.json'
5555
const { portalID, localeConfig, documentFinderConfig } = portalConfig
5656
const { documentFinderAPIUrl } = documentFinderConfig
5757
export const availableLocales = {}

src/client/helpers/helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export const processPortalConfig = async portalConfig => {
200200
export const createPerspectiveConfig = async ({ portalID, searchPerspectives }) => {
201201
const perspectiveConfig = []
202202
for (const perspectiveID of searchPerspectives) {
203-
const { default: perspective } = await import(`../configs/${portalID}/perspective_configs/search_perspectives/${perspectiveID}.json`)
203+
const { default: perspective } = await import(`../../configs/${portalID}/search_perspectives/${perspectiveID}.json`)
204204
perspectiveConfig.push(perspective)
205205
}
206206
for (const perspective of perspectiveConfig) {
@@ -252,7 +252,7 @@ export const createPerspectiveConfig = async ({ portalID, searchPerspectives })
252252
export const createPerspectiveConfigOnlyInfoPages = async ({ portalID, onlyInstancePagePerspectives }) => {
253253
const perspectiveConfigOnlyInfoPages = []
254254
for (const perspectiveID of onlyInstancePagePerspectives) {
255-
const { default: perspective } = await import(`../configs/${portalID}/perspective_configs/only_instance_pages/${perspectiveID}.json`)
255+
const { default: perspective } = await import(`../../configs/${portalID}/only_instance_pages/${perspectiveID}.json`)
256256
perspectiveConfigOnlyInfoPages.push(perspective)
257257
}
258258
for (const perspective of perspectiveConfigOnlyInfoPages) {

src/client/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import './index.css'
1515
import '@nosferatu500/react-sortable-tree/style.css'
1616
import 'react-redux-toastr/lib/css/react-redux-toastr.min.css'
1717
import 'mapbox-gl/dist/mapbox-gl.css'
18-
import portalConfig from './configs/portalConfig.json'
18+
import portalConfig from '../configs/portalConfig.json'
1919

2020
const { localeConfig } = portalConfig
2121
const store = configureStore()

src/client/reducers/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import portalConfig from '../configs/portalConfig.json'
1+
import portalConfig from '../../configs/portalConfig.json'
22
import { combineReducers } from 'redux'
33
import { reducer as toastrReducer } from 'react-redux-toastr'
44
import { createResultsReducer } from './general/results'
@@ -30,11 +30,11 @@ const { portalID, perspectives } = portalConfig
3030
const perspectiveConfig = []
3131
const perspectiveConfigOnlyInfoPages = []
3232
for (const perspectiveID of perspectives.searchPerspectives) {
33-
const { default: perspective } = await import(`../configs/${portalID}/perspective_configs/search_perspectives/${perspectiveID}.json`)
33+
const { default: perspective } = await import(`../../configs/${portalID}/search_perspectives/${perspectiveID}.json`)
3434
perspectiveConfig.push(perspective)
3535
}
3636
for (const perspectiveID of perspectives.onlyInstancePages) {
37-
const { default: perspective } = await import(`../configs/${portalID}/perspective_configs/only_instance_pages/${perspectiveID}.json`)
37+
const { default: perspective } = await import(`../../configs/${portalID}/only_instance_pages/${perspectiveID}.json`)
3838
perspectiveConfigOnlyInfoPages.push(perspective)
3939
}
4040
for (const perspective of perspectiveConfig) {
File renamed without changes.

0 commit comments

Comments
 (0)