@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citolab/tspci-tao",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "create a zip file that can be imported into TAO",
5
5
  "author": "patrick <patrick.deklein@cito.nl>, Marcel Hoekstra <marcel.hoekstra@cito.nl>",
6
6
  "repository": "",
@@ -0,0 +1,7 @@
1
+ # 1.0.2
2
+
3
+ - fixed error when trying to remove a folder that did not exist
4
+
5
+ # 1.0.1
6
+
7
+ Initial version
@@ -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("'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.");
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(`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}`)
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