Skip to content
Snippets Groups Projects
Commit 19a57c64 authored by chris's avatar chris
Browse files

imports and start new services

parent f2e4bf9e
No related branches found
No related tags found
1 merge request!485Questions service
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
"typeface-inter": "^1.1.13", "typeface-inter": "^1.1.13",
"typeface-vollkorn": "^0.0.54", "typeface-vollkorn": "^0.0.54",
"wax-prosemirror-core": "^0.8.8", "wax-prosemirror-core": "^0.8.8",
"wax-prosemirror-services": "^0.8.8" "wax-prosemirror-services": "^0.8.8",
"wax-questions-service": "^0.8.8"
}, },
"scripts": { "scripts": {
"start": "react-app-rewired start", "start": "react-app-rewired start",
......
...@@ -19,6 +19,8 @@ import { ...@@ -19,6 +19,8 @@ import {
// ExternalAPIContentService, // ExternalAPIContentService,
} from 'wax-prosemirror-services'; } from 'wax-prosemirror-services';
import { QuestionsService } from 'wax-questions-service';
import { DefaultSchema } from 'wax-prosemirror-core'; import { DefaultSchema } from 'wax-prosemirror-core';
import invisibles, { hardBreak } from '@guardian/prosemirror-invisibles'; import invisibles, { hardBreak } from '@guardian/prosemirror-invisibles';
const API_KEY = ''; const API_KEY = '';
...@@ -108,18 +110,18 @@ export default { ...@@ -108,18 +110,18 @@ export default {
'Images', 'Images',
'Tables', 'Tables',
// 'ExternalAPIContent', // 'ExternalAPIContent',
// 'QuestionsDropDown', 'QuestionsDropDown',
'FullScreen', 'FullScreen',
], ],
}, },
// { {
// templateArea: 'fillTheGap', templateArea: 'fillTheGap',
// toolGroups: ['FillTheGap'], toolGroups: ['FillTheGap'],
// }, },
// { {
// templateArea: 'MultipleDropDown', templateArea: 'MultipleDropDown',
// toolGroups: ['MultipleDropDown'], toolGroups: ['MultipleDropDown'],
// }, },
], ],
// ExternalAPIContentService: { // ExternalAPIContentService: {
// ExternalAPIContentTransformation: ExternalAPIContentTransformation, // ExternalAPIContentTransformation: ExternalAPIContentTransformation,
...@@ -132,6 +134,7 @@ export default { ...@@ -132,6 +134,7 @@ export default {
PmPlugins: [columnResizing(), tableEditing(), invisibles([hardBreak()])], PmPlugins: [columnResizing(), tableEditing(), invisibles([hardBreak()])],
services: [ services: [
// new ExternalAPIContentService(), // new ExternalAPIContentService(),
new QuestionsService(),
new ListsService(), new ListsService(),
new LinkService(), new LinkService(),
new InlineAnnotationsService(), new InlineAnnotationsService(),
......
...@@ -14,38 +14,30 @@ ...@@ -14,38 +14,30 @@
7 silly execute attempt 7 silly execute attempt
8 silly runScriptInDir build [] wax-prosemirror-core 8 silly runScriptInDir build [] wax-prosemirror-core
9 silly getExecOpts { cwd: '/home/chris/workspace/wax-prosemirror/wax-prosemirror-core' } 9 silly getExecOpts { cwd: '/home/chris/workspace/wax-prosemirror/wax-prosemirror-core' }
10 error build Errored while running script in 'wax-prosemirror-core' 10 silly runScriptInDir build [] wax-prosemirror-services
11 error execute callback with error 11 silly getExecOpts {
12 error Error: Command failed: yarn run build 11 silly getExecOpts cwd: '/home/chris/workspace/wax-prosemirror/wax-prosemirror-services'
12 error 11 silly getExecOpts }
12 error ./index.js → dist/index.js... 12 error build Errored while running script in 'wax-prosemirror-services'
12 error Browserslist: caniuse-lite is outdated. Please run: 13 error execute callback with error
12 error npx browserslist@latest --update-db 14 error Error: Command failed: yarn run build
12 error (!) Circular dependency 14 error
12 error index.js -> src/Wax.js -> src/Application.js -> src/config/defaultConfig.js -> src/config/defaultServices/MenuService/MenuService.js -> src/config/defaultServices/MenuService/Menu.js -> src/utilities/lib/ToolGroup.js -> src/components/ToolGroups.js -> src/components/ToolGroupComponent.js -> src/components/ui/Dropdown.js -> src/components/ui/MenuButton.js -> index.js 14 error index.js → dist/index.js...
12 error [!] Error: 'default' is not exported by src/components/icons/icons.js, imported by index.js 14 error Browserslist: caniuse-lite is outdated. Please run:
12 error https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module 14 error npx browserslist@latest --update-db
12 error index.js (47:9) 14 error [!] Error: Could not resolve './src/MultipleChoiceQuestionService/MultipleChoiceQuestionService' from index.js
12 error 45: export { default as Tabs } from './src/components/tabs/Tabs'; 14 error Error: Could not resolve './src/MultipleChoiceQuestionService/MultipleChoiceQuestionService' from index.js
12 error 46: export { default as MenuButton } from './src/components/ui/MenuButton'; 14 error at error (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:5171:30)
12 error 47: export { default as icons } from './src/components/icons/icons'; 14 error at ModuleLoader.handleResolveId (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:17864:24)
12 error ^ 14 error at /home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:17856:22
12 error 48: export { default as Icon } from './src/components/icons/Icon'; 14 error at async Promise.all (index 26)
12 error 49: export { default as Button } from './src/components/Button'; 14 error at ModuleLoader.fetchStaticDependencies (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:17854:34)
12 error Error: 'default' is not exported by src/components/icons/icons.js, imported by index.js 14 error at async Promise.all (index 0)
12 error at error (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:5171:30) 14 error at ModuleLoader.fetchModule (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:17831:9)
12 error at Module.error (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:9603:16) 14 error at async Promise.all (index 0)
12 error at handleMissingExport (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:9525:28) 14 error
12 error at Module.getVariableForExportName (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:9768:24) 14 error error Command failed with exit code 1.
12 error at Module.traceVariable (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:9983:45) 14 error $ BABEL_ENV=production rollup -c
12 error at ModuleScope.findVariable (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:8549:39) 14 error info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
12 error at FunctionScope.findVariable (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:2795:38) 14 error
12 error at ChildScope.findVariable (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:2795:38) 14 error at /home/chris/workspace/wax-prosemirror/node_modules/lerna/node_modules/execa/index.js:236:11
12 error at Identifier$1.bind (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:4152:40)
12 error at MemberExpression.bind (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:2880:23)
12 error
12 error error Command failed with exit code 1.
12 error $ BABEL_ENV=production rollup -c
12 error info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
12 error
12 error at /home/chris/workspace/wax-prosemirror/node_modules/lerna/node_modules/execa/index.js:236:11
...@@ -28,15 +28,7 @@ export { default as TrackOptionsService } from './src/TrackOptionsService/TrackO ...@@ -28,15 +28,7 @@ export { default as TrackOptionsService } from './src/TrackOptionsService/TrackO
export { default as CustomTagInlineService } from './src/CustomTagService/CustomTagInlineService/CustomTagInlineService'; export { default as CustomTagInlineService } from './src/CustomTagService/CustomTagInlineService/CustomTagInlineService';
export { default as CustomTagBlockService } from './src/CustomTagService/CustomTagBlockService/CustomTagBlockService'; export { default as CustomTagBlockService } from './src/CustomTagService/CustomTagBlockService/CustomTagBlockService';
export { default as CustomTagService } from './src/CustomTagService/CustomTagService'; export { default as CustomTagService } from './src/CustomTagService/CustomTagService';
export { default as MultipleChoiceQuestionService } from './src/MultipleChoiceQuestionService/MultipleChoiceQuestionService';
export { default as MultipleChoiceSingleCorrectQuestionService } from './src/MultipleChoiceQuestionService/MultipleChoiceSingleCorrectQuestionService/MultipleChoiceSingleCorrectQuestionService';
export { default as TrueFalseQuestionService } from './src/MultipleChoiceQuestionService/TrueFalseQuestionService/TrueFalseQuestionService';
export { default as FillTheGapQuestionService } from './src/FillTheGapQuestionService/FillTheGapQuestionService';
export { default as EssayService } from './src/EssayService/EssayService';
export { default as MatchingService } from './src/MatchingService/MatchingService';
export { default as EnterService } from './src/EnterService/EnterService'; export { default as EnterService } from './src/EnterService/EnterService';
export { default as MultipleDropDownService } from './src/MultipleDropDownService/MultipleDropDownService';
export { default as OENContainersService } from './src/OENContainersService/OENContainersService'; export { default as OENContainersService } from './src/OENContainersService/OENContainersService';
export { default as YjsService } from './src/YjsService/YjsService'; export { default as YjsService } from './src/YjsService/YjsService';
export { default as ExternalAPIContentService } from './src/ExternalAPIContentService/ExternalAPIContentService'; export { default as ExternalAPIContentService } from './src/ExternalAPIContentService/ExternalAPIContentService';
...@@ -64,7 +56,6 @@ export { default as TrackOptionsToolGroupService } from './src/WaxToolGroups/Tra ...@@ -64,7 +56,6 @@ export { default as TrackOptionsToolGroupService } from './src/WaxToolGroups/Tra
export { default as TrackCommentOptionsToolGroupService } from './src/WaxToolGroups/TrackCommentOptionsToolGroupService/TrackCommentOptionsToolGroupService'; export { default as TrackCommentOptionsToolGroupService } from './src/WaxToolGroups/TrackCommentOptionsToolGroupService/TrackCommentOptionsToolGroupService';
export { default as CustomTagInlineToolGroupService } from './src/WaxToolGroups/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroupService'; export { default as CustomTagInlineToolGroupService } from './src/WaxToolGroups/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroupService';
export { default as CustomTagBlockToolGroupService } from './src/WaxToolGroups/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroupService'; export { default as CustomTagBlockToolGroupService } from './src/WaxToolGroups/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroupService';
export { default as QuestionsDropDownToolGroupService } from './src/WaxToolGroups/QuestionsDropDownToolGroupService/QuestionsDropDownToolGroupService';
export { default as OENContainersToolGroupService } from './src/WaxToolGroups/OENContainersToolGroupService/OENContainersToolGroupService'; export { default as OENContainersToolGroupService } from './src/WaxToolGroups/OENContainersToolGroupService/OENContainersToolGroupService';
export { default as OENLeftToolGroupService } from './src/WaxToolGroups/OENLeftToolGroupService/OENLeftToolGroupService'; export { default as OENLeftToolGroupService } from './src/WaxToolGroups/OENLeftToolGroupService/OENLeftToolGroupService';
export { default as FindAndReplaceToolGroupService } from './src/WaxToolGroups/FindAndReplaceToolGroupService/FindAndReplaceToolGroupService'; export { default as FindAndReplaceToolGroupService } from './src/WaxToolGroups/FindAndReplaceToolGroupService/FindAndReplaceToolGroupService';
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
}, },
"dependencies": { "dependencies": {
"@pubsweet/ui-toolkit": "^2.3.1", "@pubsweet/ui-toolkit": "^2.3.1",
"wax-prosemirror-core":"^0.8.8",
"wax-prosemirror-services":"^0.8.8", "wax-prosemirror-services":"^0.8.8",
"uuid": "^7.0.3" "uuid": "^7.0.3"
}, },
......
import { Service } from 'wax-prosemirror-services'; import { Service } from 'wax-prosemirror-core';
import EssayService from './EssayService/EssayService';
import FillTheGapQuestionService from './FillTheGapQuestionService/FillTheGapQuestionService';
import MatchingService from './MatchingService/MatchingService';
import MultipleDropDownService from './MultipleDropDownService/MultipleDropDownService';
import QuestionsDropDownToolGroupService from './QuestionsDropDownToolGroupService/QuestionsDropDownToolGroupService';
import MultipleChoiceQuestionService from './MultipleChoiceQuestionService/MultipleChoiceQuestionService';
class QuestionsService extends Service { class QuestionsService extends Service {
name = 'QuestionsService'; name = 'QuestionsService';
boot() {} dependencies = [
new MultipleChoiceQuestionService(),
register() {} new EssayService(),
new FillTheGapQuestionService(),
new MatchingService(),
new MultipleDropDownService(),
new QuestionsDropDownToolGroupService(),
];
} }
export default QuestionsService; export default QuestionsService;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment