Skip to content
Snippets Groups Projects
Commit 703dddef authored by Christos's avatar Christos
Browse files

Merge branch 'questions-service' into 'master'

Questions service

See merge request !485
parents 7eb553c0 178b6d26
No related branches found
No related tags found
1 merge request!485Questions service
Showing
with 161 additions and 57 deletions
......@@ -11,6 +11,10 @@ module.exports = function override(config, env) {
__dirname,
'../../wax-prosemirror-services/index',
),
'wax-questions-service': path.resolve(
__dirname,
'../../wax-questions-service/index',
),
},
};
config.module = {
......
......@@ -15,7 +15,8 @@
"typeface-inter": "^1.1.13",
"typeface-vollkorn": "^0.0.54",
"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": {
"start": "react-app-rewired start",
......
......@@ -16,15 +16,11 @@ import {
MathService,
FullScreenService,
FullScreenToolGroupService,
MultipleChoiceQuestionService,
FillTheGapQuestionService,
QuestionsDropDownToolGroupService,
EssayService,
MatchingService,
MultipleDropDownService,
// ExternalAPIContentService,
} from 'wax-prosemirror-services';
import { QuestionsService } from 'wax-questions-service';
import { DefaultSchema } from 'wax-prosemirror-core';
import invisibles, { hardBreak } from '@guardian/prosemirror-invisibles';
const API_KEY = '';
......@@ -138,12 +134,7 @@ export default {
PmPlugins: [columnResizing(), tableEditing(), invisibles([hardBreak()])],
services: [
// new ExternalAPIContentService(),
new MatchingService(),
new FillTheGapQuestionService(),
new MultipleChoiceQuestionService(),
new QuestionsDropDownToolGroupService(),
new MultipleDropDownService(),
new EssayService(),
new QuestionsService(),
new ListsService(),
new LinkService(),
new InlineAnnotationsService(),
......
......@@ -14,38 +14,30 @@
7 silly execute attempt
8 silly runScriptInDir build [] 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'
11 error execute callback with error
12 error Error: Command failed: yarn run build
12 error
12 error ./index.js → dist/index.js...
12 error Browserslist: caniuse-lite is outdated. Please run:
12 error npx browserslist@latest --update-db
12 error (!) Circular dependency
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
12 error [!] Error: 'default' is not exported by src/components/icons/icons.js, imported by index.js
12 error https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
12 error index.js (47:9)
12 error 45: export { default as Tabs } from './src/components/tabs/Tabs';
12 error 46: export { default as MenuButton } from './src/components/ui/MenuButton';
12 error 47: export { default as icons } from './src/components/icons/icons';
12 error ^
12 error 48: export { default as Icon } from './src/components/icons/Icon';
12 error 49: export { default as Button } from './src/components/Button';
12 error Error: 'default' is not exported by src/components/icons/icons.js, imported by index.js
12 error at error (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:5171:30)
12 error at Module.error (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:9603:16)
12 error at handleMissingExport (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:9525:28)
12 error at Module.getVariableForExportName (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:9768:24)
12 error at Module.traceVariable (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:9983:45)
12 error at ModuleScope.findVariable (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:8549:39)
12 error at FunctionScope.findVariable (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:2795:38)
12 error at ChildScope.findVariable (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:2795:38)
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
10 silly runScriptInDir build [] wax-prosemirror-services
11 silly getExecOpts {
11 silly getExecOpts cwd: '/home/chris/workspace/wax-prosemirror/wax-prosemirror-services'
11 silly getExecOpts }
12 error build Errored while running script in 'wax-prosemirror-services'
13 error execute callback with error
14 error Error: Command failed: yarn run build
14 error
14 error index.js → dist/index.js...
14 error Browserslist: caniuse-lite is outdated. Please run:
14 error npx browserslist@latest --update-db
14 error [!] Error: Could not resolve './src/MultipleChoiceQuestionService/MultipleChoiceQuestionService' from index.js
14 error Error: Could not resolve './src/MultipleChoiceQuestionService/MultipleChoiceQuestionService' from index.js
14 error at error (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:5171:30)
14 error at ModuleLoader.handleResolveId (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:17864:24)
14 error at /home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:17856:22
14 error at async Promise.all (index 26)
14 error at ModuleLoader.fetchStaticDependencies (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:17854:34)
14 error at async Promise.all (index 0)
14 error at ModuleLoader.fetchModule (/home/chris/workspace/wax-prosemirror/node_modules/rollup/dist/shared/rollup.js:17831:9)
14 error at async Promise.all (index 0)
14 error
14 error error Command failed with exit code 1.
14 error $ BABEL_ENV=production rollup -c
14 error info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
14 error
14 error at /home/chris/workspace/wax-prosemirror/node_modules/lerna/node_modules/execa/index.js:236:11
......@@ -13,6 +13,7 @@
"workspaces": [
"wax-prosemirror-core",
"wax-prosemirror-services",
"wax-questions-service",
"editors/*"
],
"scripts": {
......
......@@ -28,15 +28,7 @@ export { default as TrackOptionsService } from './src/TrackOptionsService/TrackO
export { default as CustomTagInlineService } from './src/CustomTagService/CustomTagInlineService/CustomTagInlineService';
export { default as CustomTagBlockService } from './src/CustomTagService/CustomTagBlockService/CustomTagBlockService';
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 MultipleDropDownService } from './src/MultipleDropDownService/MultipleDropDownService';
export { default as OENContainersService } from './src/OENContainersService/OENContainersService';
export { default as YjsService } from './src/YjsService/YjsService';
export { default as ExternalAPIContentService } from './src/ExternalAPIContentService/ExternalAPIContentService';
......@@ -64,7 +56,6 @@ export { default as TrackOptionsToolGroupService } from './src/WaxToolGroups/Tra
export { default as TrackCommentOptionsToolGroupService } from './src/WaxToolGroups/TrackCommentOptionsToolGroupService/TrackCommentOptionsToolGroupService';
export { default as CustomTagInlineToolGroupService } from './src/WaxToolGroups/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroupService';
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 OENLeftToolGroupService } from './src/WaxToolGroups/OENLeftToolGroupService/OENLeftToolGroupService';
export { default as FindAndReplaceToolGroupService } from './src/WaxToolGroups/FindAndReplaceToolGroupService/FindAndReplaceToolGroupService';
......
# dependencies
/node_modules
# testing
/coverage
# production
/build
# dist
/dist
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.directory
npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn.lock
package-lock.json
## Wax questions package
1. Multiple Choice and single correct variant
2. True / fallse and single correct variant
3. Matching
4. Essay
5. Multiple dropdowns
6. Fill in the blank
## How to use
export { default as QuestionsService } from './src/QuestionsService';
{
"name": "wax-questions-service",
"author": "Christos Kokosias & Giannis Kopanas",
"version": "0.8.8",
"description": "Wax Questions Service",
"license": "MIT",
"main": "dist/index.js",
"style": "dist/index.css",
"files": [
"dist"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c"
},
"dependencies": {
"@pubsweet/ui-toolkit": "^2.3.1",
"wax-prosemirror-core":"^0.8.8",
"wax-prosemirror-services":"^0.8.8",
"uuid": "^7.0.3"
},
"devDependencies": {
"mocha": "^3.4.2",
"prosemirror-test-builder": "^1.0.1"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"styled-components": "^5.3.1"
}
}
import babel from 'rollup-plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import external from 'rollup-plugin-peer-deps-external';
import css from 'rollup-plugin-import-css';
import { terser } from 'rollup-plugin-terser';
export default {
input: 'index.js',
output: [
{
file: 'dist/index.js',
format: 'cjs',
sourcemap: false,
},
],
plugins: [
css(),
external({
includeDependencies: true,
}),
babel({
presets: ['react-app'],
plugins: [
[
'@babel/plugin-transform-runtime',
{
regenerator: true,
},
],
['@babel/plugin-proposal-decorators', { legacy: true }],
'babel-plugin-parameter-decorator',
],
exclude: 'node_modules/**',
runtimeHelpers: true,
}),
commonjs(),
terser(),
],
external: [
'uuid',
'react',
'react-dom',
'react-dropdown',
'lodash',
'prosemirror-tables',
'prosemirror-schema-list',
'prosemirror-model',
'prosemirror-inputrules',
'@babel/runtime/regenerator',
],
};
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