node-sword-interface 1.0.93 → 1.0.95

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/binding.gyp CHANGED
@@ -230,7 +230,7 @@
230
230
  "action_name": "clean_build_artifacts",
231
231
  "inputs": [],
232
232
  "outputs": ["<(PRODUCT_DIR)/cleanup.stamp"],
233
- "action": [ "sh", "scripts/cleanup_build_artifacts.sh", "<(PRODUCT_DIR)/cleanup.stamp" ]
233
+ "action": [ "node", "scripts/cleanup_build_artifacts.js", "<(PRODUCT_DIR)/cleanup.stamp" ]
234
234
  }
235
235
  ]
236
236
  }]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-sword-interface",
3
- "version": "1.0.93",
3
+ "version": "1.0.95",
4
4
  "description": "Javascript (N-API) interface to SWORD library",
5
5
  "keywords": [
6
6
  "C++",
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ const stampFile = process.argv[2];
7
+
8
+ // Directories to remove
9
+ const dirsToRemove = ['sword', 'sword_build'];
10
+
11
+ for (const dir of dirsToRemove) {
12
+ const dirPath = path.resolve(__dirname, '..', dir);
13
+ if (fs.existsSync(dirPath)) {
14
+ fs.rmSync(dirPath, { recursive: true, force: true });
15
+ console.log(`Removed: ${dirPath}`);
16
+ }
17
+ }
18
+
19
+ // Create the stamp file to mark completion
20
+ if (stampFile) {
21
+ fs.writeFileSync(stampFile, new Date().toISOString());
22
+ console.log(`Created stamp file: ${stampFile}`);
23
+ }
24
+
25
+ console.log('Cleanup completed');
@@ -1,3 +0,0 @@
1
- #!/bin/sh
2
- rm -rf sword sword_build
3
- touch "$1"