codemirror-mode-zig 1.0.14 → 1.0.15
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/package.json +8 -2
- package/.gitattributes +0 -2
- package/.github/workflows/npm-publish.yml +0 -66
- package/.prettierrc +0 -3
- package/codemirror-mode-zig-1.0.14.tgz +0 -0
- package/index.html +0 -74
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codemirror-mode-zig",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -20,5 +20,11 @@
|
|
|
20
20
|
"bugs": {
|
|
21
21
|
"url": "https://github.com/imkylecat/codemirror-mode-zig/issues"
|
|
22
22
|
},
|
|
23
|
-
"homepage": "https://github.com/imkylecat/codemirror-mode-zig#readme"
|
|
23
|
+
"homepage": "https://github.com/imkylecat/codemirror-mode-zig#readme",
|
|
24
|
+
"files": [
|
|
25
|
+
"index.js",
|
|
26
|
+
"index.d.ts",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE"
|
|
29
|
+
]
|
|
24
30
|
}
|
package/.gitattributes
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Node.js Package
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
release:
|
|
8
|
-
types: [published]
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
publish-npm:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
permissions:
|
|
14
|
-
id-token: write
|
|
15
|
-
contents: write
|
|
16
|
-
attestations: write
|
|
17
|
-
packages: write
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v4
|
|
20
|
-
- uses: actions/setup-node@v4
|
|
21
|
-
with:
|
|
22
|
-
node-version: "20.x"
|
|
23
|
-
registry-url: "https://registry.npmjs.org"
|
|
24
|
-
- run: npm ci
|
|
25
|
-
- run: npm pack
|
|
26
|
-
- name: Attest package
|
|
27
|
-
id: attest
|
|
28
|
-
uses: actions/attest-build-provenance@v3
|
|
29
|
-
with:
|
|
30
|
-
subject-path: "*.tgz"
|
|
31
|
-
- name: Upload attestation to release
|
|
32
|
-
run: gh release upload ${{ github.event.release.tag_name }} ${{ steps.attest.outputs.bundle-path }}
|
|
33
|
-
env:
|
|
34
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
35
|
-
- run: npm publish --provenance
|
|
36
|
-
env:
|
|
37
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
38
|
-
- name: Upload package to release
|
|
39
|
-
run: gh release upload ${{ github.event.release.tag_name }} *.tgz
|
|
40
|
-
env:
|
|
41
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
42
|
-
publish-github-packages:
|
|
43
|
-
runs-on: ubuntu-latest
|
|
44
|
-
permissions:
|
|
45
|
-
id-token: write
|
|
46
|
-
contents: read
|
|
47
|
-
attestations: write
|
|
48
|
-
packages: write
|
|
49
|
-
steps:
|
|
50
|
-
- uses: actions/checkout@v4
|
|
51
|
-
- uses: actions/setup-node@v4
|
|
52
|
-
with:
|
|
53
|
-
node-version: "20.x"
|
|
54
|
-
always-auth: true
|
|
55
|
-
registry-url: "https://npm.pkg.github.com"
|
|
56
|
-
- run: npm ci
|
|
57
|
-
- run: npm pack
|
|
58
|
-
- name: Attest package
|
|
59
|
-
uses: actions/attest-build-provenance@v3
|
|
60
|
-
with:
|
|
61
|
-
subject-path: "*.tgz"
|
|
62
|
-
- run: |
|
|
63
|
-
npm pkg set name="@imkylecat/codemirror-mode-zig"
|
|
64
|
-
npm publish --provenance --access public --registry https://npm.pkg.github.com
|
|
65
|
-
env:
|
|
66
|
-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
package/.prettierrc
DELETED
|
Binary file
|
package/index.html
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>CodeMirror Demo</title>
|
|
7
|
-
<link
|
|
8
|
-
rel="stylesheet"
|
|
9
|
-
href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.20/codemirror.min.css"
|
|
10
|
-
/>
|
|
11
|
-
<style>
|
|
12
|
-
.CodeMirror {
|
|
13
|
-
height: auto;
|
|
14
|
-
border: 1px solid #ddd;
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
<body>
|
|
19
|
-
<textarea id="code" name="code">// Hello World in Zig with various features
|
|
20
|
-
const std = @import("std");
|
|
21
|
-
|
|
22
|
-
// This is a single-line comment
|
|
23
|
-
pub fn main() !void {
|
|
24
|
-
// Get stdout for printing
|
|
25
|
-
const stdout = std.io.getStdOut().writer();
|
|
26
|
-
|
|
27
|
-
// String example
|
|
28
|
-
const greeting = "Hello, World!";
|
|
29
|
-
|
|
30
|
-
// Number examples
|
|
31
|
-
const answer: i32 = 42;
|
|
32
|
-
const pi: f64 = 3.14159;
|
|
33
|
-
const hex_value = 0xFF;
|
|
34
|
-
|
|
35
|
-
// Print the greeting
|
|
36
|
-
try stdout.print("{s}\n", .{greeting});
|
|
37
|
-
|
|
38
|
-
// Print numbers
|
|
39
|
-
try stdout.print("The answer is: {d}\n", .{answer});
|
|
40
|
-
try stdout.print("Pi is approximately: {d}\n", .{pi});
|
|
41
|
-
try stdout.print("Hex value: 0x{X}\n", .{hex_value});
|
|
42
|
-
|
|
43
|
-
// Conditional example
|
|
44
|
-
if (answer == 42) {
|
|
45
|
-
try stdout.print("That's the answer!\n", .{});
|
|
46
|
-
} else {
|
|
47
|
-
try stdout.print("Wrong answer!\n", .{});
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Loop example
|
|
51
|
-
var i: usize = 0;
|
|
52
|
-
while (i < 3) : (i += 1) {
|
|
53
|
-
try stdout.print("Loop iteration: {d}\n", .{i});
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// For loop
|
|
57
|
-
for (0..5) |num| {
|
|
58
|
-
try stdout.print("For loop: {d}\n", .{num});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
</textarea>
|
|
62
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.20/codemirror.min.js"></script>
|
|
63
|
-
<script src="./index.js"></script>
|
|
64
|
-
<script>
|
|
65
|
-
var editor = CodeMirror.fromTextArea(
|
|
66
|
-
document.getElementById("code"),
|
|
67
|
-
{
|
|
68
|
-
lineNumbers: true,
|
|
69
|
-
mode: "zig",
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
</script>
|
|
73
|
-
</body>
|
|
74
|
-
</html>
|