@citolab/tspci 2.5.2 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/preset/javascript/src/index.js +3 -1
- package/src/cli.js +1 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citolab/tspci",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.4",
|
|
4
4
|
"description": "an opiniated typescript ims-pci builder with tao integration",
|
|
5
5
|
"author": "patrick <patrick.deklein@cito.nl>",
|
|
6
6
|
"repository": "@citolab/tspci",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"rollup-plugin-watch-assets": "^1.0.1",
|
|
47
47
|
"tailwindcss": "^3.4.11"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "3f69ce948e8d2e02131235a9488645aaa95e0413"
|
|
50
50
|
}
|
|
@@ -19,7 +19,9 @@ class Pci {
|
|
|
19
19
|
* @description The unique identifier for this PCI type.
|
|
20
20
|
*/
|
|
21
21
|
this.typeIdentifier = "###___PCI_NAME___###"; // typeIdentifier is mandatory for all PCI's
|
|
22
|
-
|
|
22
|
+
if (ctx) {
|
|
23
|
+
ctx.register(this); // we assume the qtiCustomInteractionContext is avaible due to the import above
|
|
24
|
+
}
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
/**
|
package/src/cli.js
CHANGED
|
@@ -287,7 +287,7 @@ const run = async () => {
|
|
|
287
287
|
copyDirAndReplaceInFiles(presetFolder, destinationFolder, pciName);
|
|
288
288
|
const packageJson = path.join(destinationFolder, "package.json");
|
|
289
289
|
const packageJsonContent = fs.readFileSync(packageJson, "utf8");
|
|
290
|
-
|
|
290
|
+
let packageJsonContentJson = JSON.parse(packageJsonContent);
|
|
291
291
|
|
|
292
292
|
const kebabCasedProjectName = pciName.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
293
293
|
packageJsonContentJson.name = kebabCasedProjectName;
|
|
@@ -330,9 +330,6 @@ const run = async () => {
|
|
|
330
330
|
|
|
331
331
|
if (options.values.includes("preact+tailwind")) {
|
|
332
332
|
console.log(chalk.green("Adding preact"));
|
|
333
|
-
const packageJson = path.join(destinationFolder, "package.json");
|
|
334
|
-
const packageJsonContent = fs.readFileSync(packageJson, "utf8");
|
|
335
|
-
let packageJsonContentJson = JSON.parse(packageJsonContent);
|
|
336
333
|
// delete index.ts
|
|
337
334
|
// fs.rmSync(path.join(destinationFolder, "src/index.ts"), { force: true });
|
|
338
335
|
const preactPresetFolder = path.resolve(cliPath, "./../preset/preact");
|
|
@@ -355,9 +352,6 @@ const run = async () => {
|
|
|
355
352
|
pciName
|
|
356
353
|
);
|
|
357
354
|
// point to the javascript file
|
|
358
|
-
const packageJson = path.join(destinationFolder, "package.json");
|
|
359
|
-
const packageJsonContent = fs.readFileSync(packageJson, "utf8");
|
|
360
|
-
let packageJsonContentJson = JSON.parse(packageJsonContent);
|
|
361
355
|
packageJsonContentJson.source = "src/index.ts";
|
|
362
356
|
const newPackageJsonContent = JSON.stringify(packageJsonContentJson, null, 2);
|
|
363
357
|
fs.writeFileSync(packageJson, newPackageJsonContent);
|
|
@@ -370,9 +364,6 @@ const run = async () => {
|
|
|
370
364
|
pciName
|
|
371
365
|
);
|
|
372
366
|
// point to the javascript file
|
|
373
|
-
const packageJson = path.join(destinationFolder, "package.json");
|
|
374
|
-
const packageJsonContent = fs.readFileSync(packageJson, "utf8");
|
|
375
|
-
let packageJsonContentJson = JSON.parse(packageJsonContent);
|
|
376
367
|
packageJsonContentJson.source = "src/index.js";
|
|
377
368
|
const newPackageJsonContent = JSON.stringify(packageJsonContentJson, null, 2);
|
|
378
369
|
fs.writeFileSync(packageJson, newPackageJsonContent);
|