korlix 0.1.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/README.md +39 -0
- package/bin/korlix +0 -0
- package/bin/korlix-linux-x64 +0 -0
- package/bin/korlix-win32-x64.exe +0 -0
- package/bin/korlix.js +38 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Korlix
|
|
2
|
+
|
|
3
|
+
Korlix is a frontend-first language that compiles .klx files into HTML, CSS, and JavaScript.
|
|
4
|
+
|
|
5
|
+
Create a new app:
|
|
6
|
+
|
|
7
|
+
npm create korlix@latest my-app
|
|
8
|
+
|
|
9
|
+
Or:
|
|
10
|
+
|
|
11
|
+
npm create korlix@latest
|
|
12
|
+
|
|
13
|
+
CLI:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
korlix new my-app
|
|
17
|
+
korlix dev
|
|
18
|
+
korlix build
|
|
19
|
+
korlix check
|
|
20
|
+
korlix preview
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Publish:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
cd npm/korlix
|
|
27
|
+
npm login
|
|
28
|
+
npm run publish:dry
|
|
29
|
+
npm run publish:public
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
If your npm account has two-factor authentication enabled, pass the current
|
|
33
|
+
6-digit authenticator code:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
npm run publish:public -- --otp=123456
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Publish this package before publishing `create-korlix`.
|
package/bin/korlix
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/korlix.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawnSync } = require("child_process");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
|
|
7
|
+
function getBinaryName() {
|
|
8
|
+
const platform = process.platform;
|
|
9
|
+
const arch = process.arch;
|
|
10
|
+
|
|
11
|
+
if (platform === "linux" && arch === "x64") {
|
|
12
|
+
return "korlix-linux-x64";
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (platform === "win32" && arch === "x64") {
|
|
16
|
+
return "korlix-win32-x64.exe";
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
console.error(`Unsupported platform: ${platform}-${arch}`);
|
|
20
|
+
console.error("Supported platforms:");
|
|
21
|
+
console.error(" linux-x64");
|
|
22
|
+
console.error(" win32-x64");
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const binaryPath = path.join(__dirname, getBinaryName());
|
|
27
|
+
|
|
28
|
+
if (!fs.existsSync(binaryPath)) {
|
|
29
|
+
console.error("Korlix binary not found.");
|
|
30
|
+
console.error("Expected:", binaryPath);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const result = spawnSync(binaryPath, process.argv.slice(2), {
|
|
35
|
+
stdio: "inherit"
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
process.exit(result.status ?? 1);
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "korlix",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Korlix frontend-first language compiler and CLI",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"bin": {
|
|
8
|
+
"korlix": "bin/korlix.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build:linux": "cargo build --release -p korlix-cli --manifest-path ../../Cargo.toml && cp ../../target/release/korlix ./bin/korlix-linux-x64.tmp && cp ../../target/release/korlix ./bin/korlix.tmp && mv ./bin/korlix-linux-x64.tmp ./bin/korlix-linux-x64 && mv ./bin/korlix.tmp ./bin/korlix && chmod +x ./bin/korlix ./bin/korlix-linux-x64 ./bin/korlix.js",
|
|
12
|
+
"verify": "node --check ./bin/korlix.js && node ./bin/korlix.js --help",
|
|
13
|
+
"prepack": "npm run build:linux && npm run verify",
|
|
14
|
+
"pack:dry": "npm pack --dry-run",
|
|
15
|
+
"publish:dry": "npm publish --dry-run --access public",
|
|
16
|
+
"publish:public": "npm publish --access public"
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"bin",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=18"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"korlix",
|
|
30
|
+
"klx",
|
|
31
|
+
"compiler",
|
|
32
|
+
"frontend",
|
|
33
|
+
"language",
|
|
34
|
+
"spa"
|
|
35
|
+
]
|
|
36
|
+
}
|