appmachine 0.0.2 → 0.0.5
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/bin/install.js +5 -5
- package/package.json +2 -2
package/bin/install.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
3
4
|
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = path.dirname(__filename);
|
|
4
7
|
|
|
5
8
|
function die(msg) {
|
|
6
9
|
console.error("❌ " + msg);
|
|
7
10
|
process.exit(1);
|
|
8
11
|
}
|
|
9
12
|
|
|
10
|
-
|
|
11
13
|
// Recursively copies files or directories from source (s) to destination (d)
|
|
12
14
|
function copy(s, d) {
|
|
13
15
|
const stat = fs.statSync(s);
|
|
@@ -23,7 +25,6 @@ function copy(s, d) {
|
|
|
23
25
|
fs.copyFileSync(s, d);
|
|
24
26
|
}
|
|
25
27
|
|
|
26
|
-
|
|
27
28
|
// Main setup: moves GitHub workflows and AppMachine templates into the project root
|
|
28
29
|
function install() {
|
|
29
30
|
const root = process.cwd();
|
|
@@ -44,7 +45,6 @@ function install() {
|
|
|
44
45
|
if (fs.existsSync(temp)) copy(temp, mach);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
|
|
48
48
|
try {
|
|
49
49
|
install();
|
|
50
50
|
} catch (err) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appmachine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Native iOS/Android shell generator via GitHub Actions",
|
|
5
5
|
"author": "Max Matinpalo",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"install": "node ./
|
|
8
|
+
"install": "node ./bin/install.js"
|
|
9
9
|
}
|
|
10
10
|
}
|