Skip to content

Commit

Permalink
package qti-to-html5
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick committed Nov 3, 2023
1 parent 040a68f commit cb146b0
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 17 deletions.
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
"import": "./dist/qti-components/index.js",
"require": "./dist/qti-components/index.cjs"
},
"./qti-to-html5": {
"import": "./dist/qti-to-html5/index.js",
"require": "./dist/qti-to-html5/index.cjs"
},
"./*.css": {
"import": "./dist/*.css",
"require": "./dist/*.css"
Expand All @@ -37,6 +41,9 @@
],
"qti-components": [
"./dist/qti-components/index.d.ts"
],
"qti-to-html5": [
"./dist/qti-to-html5/index.d.ts"
]
}
},
Expand Down
7 changes: 6 additions & 1 deletion scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ const outdir = 'dist';
clean: true,
minify: true,
bundle: true,
minifySyntax: true,
minifyWhitespace: true,
minifyIdentifiers: true,

entryPoints: [
//
// NOTE: Entry points must be mapped in package.json > exports, otherwise users won't be able to import them!
//
'./src/lib/qti-components/index.ts'
'./src/lib/qti-components/index.ts',
'./src/lib/qti-to-html5/index.ts'
],
define: {
'process.env.NODE_ENV': '"production"'
Expand Down
3 changes: 2 additions & 1 deletion scripts/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const outdir = 'dist';
format: ['esm'],
entryPoints: [
// NOTE: Entry points must be mapped in package.json > exports, otherwise users won't be able to import them!
'./src/lib/qti-components/index.ts'
'./src/lib/qti-components/index.ts',
'./src/lib/qti-to-html5/index.ts'
],
define: {
'process.env.NODE_ENV': '"production"'
Expand Down
1 change: 1 addition & 0 deletions src/lib/qti-to-html5/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './qti-to-html5';
File renamed without changes.
2 changes: 1 addition & 1 deletion src/stories/fetch-item.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as cheerio from 'cheerio';
import { xml } from 'lit-xml';
import { qti2html5 } from './qti2html5';
import { qti2html5 } from '../lib/qti-to-html5/qti-to-html5';

/**
* Retrieves items from an assessment test.
Expand Down
28 changes: 14 additions & 14 deletions vscode.html-custom-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
"attributes": [],
"references": []
},
{
"name": "qti-item-body",
"description": "The qti-item-body node contains the text, graphics, media objects and interactions that describe the item's content and information about how it is structured.\n---\n\n\n### **Slots:**\n - _default_ - item body content.\n- **qti-rubric-block** - the qti rubric block is placed above the item",
"attributes": [],
"references": []
},
{
"name": "qti-associable-hotspot",
"description": "\n---\n\n\n### **Events:**\n - **qti-register-hotspot** - undefined",
Expand Down Expand Up @@ -106,6 +100,12 @@
],
"references": []
},
{
"name": "qti-item-body",
"description": "The qti-item-body node contains the text, graphics, media objects and interactions that describe the item's content and information about how it is structured.\n---\n\n\n### **Slots:**\n - _default_ - item body content.\n- **qti-rubric-block** - the qti rubric block is placed above the item",
"attributes": [],
"references": []
},
{
"name": "qti-prompt",
"description": "\n---\n",
Expand Down Expand Up @@ -605,6 +605,14 @@
],
"references": []
},
{
"name": "qti-response-if",
"description": "\n---\n",
"attributes": [
{ "name": "debugCalculateResult", "values": [{ "name": "object" }] }
],
"references": []
},
{
"name": "qti-and",
"description": "\n---\n",
Expand Down Expand Up @@ -772,14 +780,6 @@
"attributes": [],
"references": []
},
{
"name": "qti-response-if",
"description": "\n---\n",
"attributes": [
{ "name": "debugCalculateResult", "values": [{ "name": "object" }] }
],
"references": []
},
{
"name": "qti-response-condition",
"description": "\n---\n",
Expand Down

0 comments on commit cb146b0

Please sign in to comment.