Skip to content

Commit

Permalink
Merge pull request #75 from scaife-viewer/develop
Browse files Browse the repository at this point in the history
Prepare for v2020-11-09-001 release
  • Loading branch information
jacobwegner authored Nov 9, 2020
2 parents c6a126a + 2f9d37f commit 1a997ea
Show file tree
Hide file tree
Showing 5 changed files with 1,732 additions and 757 deletions.
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[context."master".environment]
VUE_APP_ATLAS_GRAPHQL_ENDPOINT = "https://explorehomer-atlas.scaife-viewer.org/graphql/"
[context."spike-apollo".environment]
VUE_APP_ATLAS_GRAPHQL_ENDPOINT = "https://explorehomer-perf-dl-xxvzwupn7.herokuapp.com/graphql/"
[context."feature/latest-packages".environment]
VUE_APP_ATLAS_GRAPHQL_ENDPOINT = "https://explorehomer-feature-at-wthmih.herokuapp.com/graphql/"
95 changes: 49 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,68 +10,71 @@
"testDebug": "node --inspect-brk node_modules/.bin/jest --runInBand"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.30",
"@fortawesome/free-solid-svg-icons": "^5.14.0",
"@fortawesome/vue-fontawesome": "^0.1.10",
"@scaife-viewer/reader-alignments-mode": "^0.0.4",
"@scaife-viewer/reader-image-mode": "^0.0.5",
"@scaife-viewer/reader-interlinear-mode": "^0.0.5",
"@scaife-viewer/reader-metrical-mode": "^0.0.5",
"@scaife-viewer/reader-named-entities-mode": "^0.0.5",
"@scaife-viewer/skeleton": "^0.0.5",
"@scaife-viewer/store": "^0.0.4",
"@scaife-viewer/widget-audio": "^0.0.5",
"@scaife-viewer/widget-display-mode": "^0.0.5",
"@scaife-viewer/widget-library": "^0.0.4",
"@scaife-viewer/widget-metadata": "^0.0.4",
"@scaife-viewer/widget-named-entities": "^0.0.5",
"@scaife-viewer/widget-new-alexandria": "^0.0.5",
"@scaife-viewer/widget-passage-ancestors": "^0.0.5",
"@scaife-viewer/widget-passage-children": "^0.0.5",
"@scaife-viewer/widget-passage-reference": "^0.0.8",
"@scaife-viewer/widget-passage-siblings": "^0.0.5",
"@scaife-viewer/widget-reader": "^0.0.5",
"@scaife-viewer/widget-scholia": "^0.0.6",
"@scaife-viewer/widget-text-size": "^0.0.5",
"@scaife-viewer/widget-text-width": "^0.0.5",
"@scaife-viewer/widget-token-annotations": "^0.0.6",
"@scaife-viewer/widget-word-list": "^0.0.5",
"@fortawesome/fontawesome-svg-core": "^1.2.32",
"@fortawesome/free-solid-svg-icons": "^5.15.1",
"@fortawesome/vue-fontawesome": "^2.0.0",
"@scaife-viewer/common": "^0.0.7",
"@scaife-viewer/reader-alignments-mode": "^0.0.11",
"@scaife-viewer/reader-image-mode": "^0.0.11",
"@scaife-viewer/reader-interlinear-mode": "^0.0.11",
"@scaife-viewer/reader-metrical-mode": "^0.0.11",
"@scaife-viewer/reader-named-entities-mode": "^0.0.11",
"@scaife-viewer/reader-syntax-trees-mode": "^0.0.7",
"@scaife-viewer/skeleton": "^0.0.12",
"@scaife-viewer/store": "^0.0.10",
"@scaife-viewer/widget-audio": "^0.0.11",
"@scaife-viewer/widget-display-mode": "^0.0.11",
"@scaife-viewer/widget-library": "^0.0.10",
"@scaife-viewer/widget-metadata": "^0.0.10",
"@scaife-viewer/widget-named-entities": "^0.0.11",
"@scaife-viewer/widget-new-alexandria": "^0.0.11",
"@scaife-viewer/widget-passage-ancestors": "^0.0.11",
"@scaife-viewer/widget-passage-children": "^0.0.11",
"@scaife-viewer/widget-passage-reference": "^0.0.14",
"@scaife-viewer/widget-passage-siblings": "^0.0.11",
"@scaife-viewer/widget-reader": "^0.0.11",
"@scaife-viewer/widget-scholia": "^0.0.12",
"@scaife-viewer/widget-text-size": "^0.0.11",
"@scaife-viewer/widget-text-width": "^0.0.11",
"@scaife-viewer/widget-toc": "^0.0.10",
"@scaife-viewer/widget-token-annotations": "^0.0.12",
"@scaife-viewer/widget-word-list": "^0.0.11",
"apollo-boost": "^0.4.9",
"core-js": "^3.6.5",
"graphql-tag": "^2.11.0",
"node-sass": "^4.14.1",
"path": "^0.12.7",
"sass-loader": "^9.0.2",
"vue": "^2.6.11",
"sass-loader": "^10.0.3",
"vue": "^2.6.12",
"vue-apollo": "^3.0.4",
"vue-router": "^3.4.3",
"vue-router": "^3.4.6",
"vuex": "^3.5.1",
"vuex-router-sync": "^5.0.0",
"webpack": "^4.44.1"
"webpack": "^5.1.0"
},
"devDependencies": {
"@babel/core": "^7.11.1",
"@babel/preset-env": "^7.11.0",
"@vue/cli-plugin-babel": "^4.5.4",
"@vue/cli-plugin-eslint": "^4.5.4",
"@vue/cli-plugin-unit-jest": "^4.5.4",
"@vue/cli-service": "^4.5.4",
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.11.5",
"@vue/cli-plugin-babel": "^4.5.7",
"@vue/cli-plugin-eslint": "^4.5.7",
"@vue/cli-plugin-unit-jest": "^4.5.7",
"@vue/cli-service": "^4.5.7",
"@vue/eslint-config-airbnb": "^5.1.0",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/server-test-utils": "^1.0.4",
"@vue/test-utils": "^1.0.4",
"@vue/server-test-utils": "^1.1.0",
"@vue/test-utils": "^1.1.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.3.0",
"eslint": "^7.7.0",
"babel-jest": "^26.5.2",
"eslint": "^7.11.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-vue": "^6.2.2",
"jest": "^26.4.0",
"prettier": "^2.0.5",
"eslint-plugin-vue": "^7.0.1",
"jest": "^26.5.3",
"prettier": "^2.1.2",
"style-resources-loader": "^1.3.3",
"vue-cli-plugin-style-resources-loader": "^0.1.4",
"vue-jest": "^3.0.6",
"vue-server-renderer": "2.6.11",
"vue-template-compiler": "^2.6.11"
"vue-jest": "^3.0.7",
"vue-server-renderer": "2.6.12",
"vue-template-compiler": "^2.6.12"
},
"postcss": {
"plugins": {
Expand Down
110 changes: 45 additions & 65 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,98 +3,78 @@ import VueApollo from 'vue-apollo';
import { sync } from 'vuex-router-sync';

import {
faChevronLeft,
faChevronDown,
faChevronRight,
faVolumeUp,
faUser,
faMapMarkerAlt,
faGripLines,
faGripLinesVertical,
faAlignLeft,
faBookOpen,
faSearchMinus,
faSearchPlus,
faHome,
faWindowMaximize,
} from '@fortawesome/free-solid-svg-icons';

import { SkeletonPlugin } from '@scaife-viewer/skeleton';
import {
DISPLAY_MODE_SENTENCE_ALIGNMENTS,
DISPLAY_MODE_ALIGNMENTS,
DISPLAY_MODE_FOLIO,
DISPLAY_MODE_INTERLINEAR,
DISPLAY_MODE_METRICAL,
DISPLAY_MODE_NAMED_ENTITIES,
DISPLAY_MODE_SYNTAX_TREES,
DISPLAY_MODE_DEFAULT,
} from '@scaife-viewer/store';
import { SkeletonPlugin } from '@scaife-viewer/skeleton';

import { DefaultModeReader } from '@scaife-viewer/widget-reader';

import AlignmentsModeReader from '@scaife-viewer/reader-alignments-mode';
import ImageModeReader from '@scaife-viewer/reader-image-mode';
import NamedEntitiesModeReader from '@scaife-viewer/reader-named-entities-mode';
import ImageModeReader, {
iconMap as imageModeReaderIconMap,
} from '@scaife-viewer/reader-image-mode';
import NamedEntitiesModeReader, {
iconMap as namedEntitesReaderIconMap,
} from '@scaife-viewer/reader-named-entities-mode';
import MetricalModeReader from '@scaife-viewer/reader-metrical-mode';
import InterlinearModeReader from '@scaife-viewer/reader-interlinear-mode';
import { DefaultModeReader } from '@scaife-viewer/widget-reader';
import SyntaxTreesModeReader from '@scaife-viewer/reader-syntax-trees-mode';

import { iconMap as commonIconMap } from '@scaife-viewer/common';
import { iconMap as audioIconMap } from '@scaife-viewer/widget-audio';
// eslint-disable-next-line max-len
import { iconMap as namedEntitiesIconMap } from '@scaife-viewer/widget-named-entities';

import App from '@/App.vue';
import router from '@/router';
import store, { apolloProvider } from '@/store';

sync(store, router);

const iconMap = [
faChevronLeft,
faChevronDown,
faChevronRight,
faVolumeUp,
faUser,
faMapMarkerAlt,
faGripLines,
faGripLinesVertical,
faAlignLeft,
faBookOpen,
faSearchMinus,
faSearchPlus,
faHome,
faWindowMaximize,
].reduce((map, obj) => {
return {
...map,
[obj.iconName]: obj,
};
}, {});

const config = {
entityMap: {
accessToken:
process.env.VUE_APP_ENTITY_MAP_ACCESS_TOKEN ||
// eslint-disable-next-line max-len
'pk.eyJ1IjoicGFsdG1hbiIsImEiOiJja2JpNDVpbmUwOGF1MnJwZm91c3VybDVrIn0.KRcXBGtiUWFXkp2uaE5LLw',
mapStyle:
process.env.VUE_APP_ENTITY_MAP_STYLE ||
'mapbox://styles/paltman/ckbi4thqt156y1ijz5wldui14',
Vue.use(SkeletonPlugin, {
iconMap: {
...commonIconMap,
...audioIconMap,
...namedEntitiesIconMap,
...namedEntitesReaderIconMap,
...imageModeReaderIconMap,
},
readerComponents: {
[DISPLAY_MODE_DEFAULT]: DefaultModeReader,
[DISPLAY_MODE_INTERLINEAR]: InterlinearModeReader,
[DISPLAY_MODE_FOLIO]: ImageModeReader,
[DISPLAY_MODE_METRICAL]: MetricalModeReader,
[DISPLAY_MODE_NAMED_ENTITIES]: NamedEntitiesModeReader,
[DISPLAY_MODE_SENTENCE_ALIGNMENTS]: AlignmentsModeReader,
config: {
entityMap: {
accessToken:
// eslint-disable-next-line max-len
'pk.eyJ1IjoicGFsdG1hbiIsImEiOiJja2JpNDVpbmUwOGF1MnJwZm91c3VybDVrIn0.KRcXBGtiUWFXkp2uaE5LLw',
mapStyle: 'mapbox://styles/paltman/ckbi4thqt156y1ijz5wldui14',
},
readerComponents: {
[DISPLAY_MODE_DEFAULT]: DefaultModeReader,
[DISPLAY_MODE_INTERLINEAR]: InterlinearModeReader,
[DISPLAY_MODE_FOLIO]: ImageModeReader,
[DISPLAY_MODE_METRICAL]: MetricalModeReader,
[DISPLAY_MODE_NAMED_ENTITIES]: NamedEntitiesModeReader,
[DISPLAY_MODE_ALIGNMENTS]: AlignmentsModeReader,
[DISPLAY_MODE_SYNTAX_TREES]: SyntaxTreesModeReader,
},
pageTitle: (title) => `Explore Homer | ${title}`,
},
};

Vue.use(SkeletonPlugin, { iconMap, config });
});

Vue.use(VueApollo);

Vue.config.productionTip = false;

Vue.prototype.$isEmpty = obj =>
Vue.prototype.$isEmpty = (obj) =>
Object.keys(obj).length === 0 && obj.constructor === Object;

new Vue({
router,
store,
render: h => h(App),
render: (h) => h(App),
apolloProvider,
}).$mount('#app');
2 changes: 1 addition & 1 deletion src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import TOCsView from '@/views/TOCsView.vue';

export default [
{ path: '/', redirect: 'reader' },
{ path: '/reader', component: ReaderView, name: 'reader' },
{ path: '/reader/:urn?', component: ReaderView, name: 'reader' },
{ path: '/tocs', component: TOCsView, name: 'tocs' },
];
Loading

0 comments on commit 1a997ea

Please sign in to comment.