codemirror-mode-zig 1.0.13 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codemirror-mode-zig",
3
- "version": "1.0.13",
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,2 +0,0 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto
@@ -1,60 +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
- contents: write
15
- id-token: write
16
- attestations: write
17
- steps:
18
- - uses: actions/checkout@v4
19
- - uses: actions/setup-node@v4
20
- with:
21
- node-version: "20.x"
22
- registry-url: "https://registry.npmjs.org"
23
- - run: npm ci
24
- - run: npm pack
25
- - name: Attest package
26
- uses: actions/attest-build-provenance@v1
27
- with:
28
- subject-path: "*.tgz"
29
- - run: npm publish --provenance
30
- env:
31
- NODE_AUTH_TOKEN: ${{secrets.npm_token}}
32
- - name: Upload package to release
33
- run: gh release upload ${{ github.event.release.tag_name }} *.tgz
34
- env:
35
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36
- publish-github-packages:
37
- runs-on: ubuntu-latest
38
- permissions:
39
- contents: read
40
- id-token: write
41
- packages: write
42
- attestations: write
43
- steps:
44
- - uses: actions/checkout@v4
45
- - uses: actions/setup-node@v4
46
- with:
47
- node-version: "20.x"
48
- always-auth: true
49
- registry-url: "https://npm.pkg.github.com"
50
- - run: npm ci
51
- - run: npm pack
52
- - name: Attest package
53
- uses: actions/attest-build-provenance@v1
54
- with:
55
- subject-path: "*.tgz"
56
- - run: |
57
- npm pkg set name="@imkylecat/codemirror-mode-zig"
58
- npm publish --provenance --access public --registry https://npm.pkg.github.com
59
- env:
60
- NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
package/.prettierrc DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "tabWidth": 4
3
- }
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>