transpic-cli 0.1.0 → 0.1.1
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/Cargo.lock +1 -1
- package/Cargo.toml +1 -1
- package/package.json +2 -2
- package/src/cli.js +2 -2
package/Cargo.lock
CHANGED
package/Cargo.toml
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "transpic-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A fast image manipulation CLI tool",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"transpic": "./src/cli.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "cargo build --release"
|
|
10
|
+
"build": "cargo build --release && node -e \"const fs = require('fs'); if (!fs.existsSync('./bin')) fs.mkdirSync('./bin'); const b = process.platform === 'win32' ? 'transpic-cli.exe' : 'transpic-cli'; fs.copyFileSync('./target/release/' + b, './bin/' + b);\""
|
|
11
11
|
},
|
|
12
12
|
"keywords": [
|
|
13
13
|
"cli",
|
package/src/cli.js
CHANGED
|
@@ -5,11 +5,11 @@ const path = require('path');
|
|
|
5
5
|
const fs = require('fs');
|
|
6
6
|
|
|
7
7
|
const binaryName = process.platform === 'win32' ? 'transpic-cli.exe' : 'transpic-cli';
|
|
8
|
-
const binaryPath = path.join(__dirname, '..', '
|
|
8
|
+
const binaryPath = path.join(__dirname, '..', 'bin', binaryName);
|
|
9
9
|
|
|
10
10
|
if (!fs.existsSync(binaryPath)) {
|
|
11
11
|
console.error("Error: Rust binary not found.");
|
|
12
|
-
console.error("Please
|
|
12
|
+
console.error("Please make sure the package was built correctly.");
|
|
13
13
|
process.exit(1);
|
|
14
14
|
}
|
|
15
15
|
|