ys-lang 8.0.0
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/install.js +28 -0
- package/oys.exe +0 -0
- package/package.json +25 -0
- package/yo.exe +0 -0
package/install.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const binDir = path.join(__dirname, 'bin');
|
|
5
|
+
const pkgDir = __dirname;
|
|
6
|
+
|
|
7
|
+
fs.mkdirSync(binDir, { recursive: true });
|
|
8
|
+
|
|
9
|
+
// Copy binaries from the package itself
|
|
10
|
+
const binaries = ['oys.exe', 'yo.exe'];
|
|
11
|
+
let copied = 0;
|
|
12
|
+
for (const bin of binaries) {
|
|
13
|
+
const src = path.join(pkgDir, bin);
|
|
14
|
+
const dst = path.join(binDir, bin);
|
|
15
|
+
if (fs.existsSync(src)) {
|
|
16
|
+
fs.copyFileSync(src, dst);
|
|
17
|
+
copied++;
|
|
18
|
+
console.log(` Installed ${bin}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (copied === 0) {
|
|
23
|
+
console.error('No binaries found in package. This package is Windows-only.');
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
console.log('Y# v8.0.0 installed successfully!');
|
|
28
|
+
console.log('Run: npx ys-lang build myprogram.ys');
|
package/oys.exe
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ys-lang",
|
|
3
|
+
"version": "8.0.0",
|
|
4
|
+
"description": "Y# programming language compiler and package manager",
|
|
5
|
+
"keywords": ["ys", "ys-lang", "oyster", "programming-language", "compiler"],
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/ouzlifaneyassine1-dot/YSharp-YSharp"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"package.json",
|
|
13
|
+
"install.js",
|
|
14
|
+
"oys.exe",
|
|
15
|
+
"yo.exe"
|
|
16
|
+
],
|
|
17
|
+
"bin": {
|
|
18
|
+
"ys-lang": "bin/oys.exe"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"postinstall": "node install.js"
|
|
22
|
+
},
|
|
23
|
+
"os": ["win32", "darwin", "linux"],
|
|
24
|
+
"cpu": ["x64"]
|
|
25
|
+
}
|
package/yo.exe
ADDED
|
Binary file
|