@citolab/tspci-tao 1.0.1 → 1.0.2
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 +1 -1
- package/release-notes.md +7 -0
- package/src/createPackage.mjs +10 -2
package/package.json
CHANGED
package/release-notes.md
ADDED
package/src/createPackage.mjs
CHANGED
|
@@ -36,7 +36,9 @@ export const bundle = () => {
|
|
|
36
36
|
);
|
|
37
37
|
return;
|
|
38
38
|
} else if (!/^[A-Za-z0-9]*$/.test(packageData[propertyName])) {
|
|
39
|
-
console.error(
|
|
39
|
+
console.error(
|
|
40
|
+
"'typeIdentifier' can only contain (alpha)numeric characters. The pci does not work in TAO if typeindentifier contains a hyphen therefor we restrict all non (alpha)numeric characters. Make sure typeIdentifier of the PCI code file matches the typeidentier in package.json."
|
|
41
|
+
);
|
|
40
42
|
return;
|
|
41
43
|
}
|
|
42
44
|
} else {
|
|
@@ -50,6 +52,10 @@ export const bundle = () => {
|
|
|
50
52
|
const outputDirectory = path.join(PACKAGE_ROOT_PATH, "dist");
|
|
51
53
|
const outputDirectoryTemp = path.join(outputDirectory, "tmp");
|
|
52
54
|
|
|
55
|
+
// remove directory to be sure it's empty
|
|
56
|
+
if (fs.existsSync(outputDirectoryTemp)) {
|
|
57
|
+
fs.rmdirSync(outputDirectoryTemp, { recursive: true });
|
|
58
|
+
}
|
|
53
59
|
// re-create the directory
|
|
54
60
|
if (!fs.existsSync(outputDirectory)) {
|
|
55
61
|
mkdirSync(outputDirectory);
|
|
@@ -225,7 +231,9 @@ export const bundle = () => {
|
|
|
225
231
|
if (fs.existsSync(iconLocation)) {
|
|
226
232
|
fs.copyFileSync(iconLocation, path.join(outputDirectoryTemp, "/interaction/creator/img/icon.svg"));
|
|
227
233
|
} else {
|
|
228
|
-
console.warn(
|
|
234
|
+
console.warn(
|
|
235
|
+
`Cannot find svg file at: ${iconLocation} default icon will be used. To have a custom icon for the PCI in TAO add a svg file here: ${iconLocation}`
|
|
236
|
+
);
|
|
229
237
|
}
|
|
230
238
|
// console.log(propertiesToReplace.short)
|
|
231
239
|
|