@rip-lang/print 1.0.0 → 1.0.1
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 +1 -1
- package/bin/rip-print +2 -1
- package/hljs-rip.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ rip-print -x lock,map src/
|
|
|
51
51
|
## How It Works
|
|
52
52
|
|
|
53
53
|
1. Walks the specified paths, discovers source files
|
|
54
|
-
2. Highlights each file using
|
|
54
|
+
2. Highlights each file using highlight.js with the detected language
|
|
55
55
|
3. Builds a single HTML page with table of contents
|
|
56
56
|
4. Starts a Bun server on a random port
|
|
57
57
|
5. Opens the browser
|
package/bin/rip-print
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
|
|
3
3
|
import { execFileSync } from 'child_process';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
4
5
|
import { dirname, join } from 'path';
|
|
5
6
|
|
|
6
|
-
const printRip = join(dirname(
|
|
7
|
+
const printRip = join(dirname(fileURLToPath(import.meta.url)), '..', 'print.rip');
|
|
7
8
|
|
|
8
9
|
try {
|
|
9
10
|
execFileSync('rip', [printRip, ...process.argv.slice(2)], { stdio: 'inherit' });
|
package/hljs-rip.js
CHANGED
|
@@ -118,7 +118,7 @@ export default function(hljs) {
|
|
|
118
118
|
|
|
119
119
|
const OPERATORS = {
|
|
120
120
|
className: 'operator',
|
|
121
|
-
begin:
|
|
121
|
+
begin: /\|>|::=|::|:=|~=|~>|<=>|=!|!\?|=~|\?\?|\?\.|\.\.\.|\.\.|=>|->|\*\*|\/\/|%%|===|!==|==|!=|<=|>=|&&|\|\||[+\-*\/%&|^~<>=!?]/,
|
|
122
122
|
relevance: 0,
|
|
123
123
|
};
|
|
124
124
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rip-lang/print",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Syntax-highlighted source code printer — Shiki-powered, serves once, auto-opens browser",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "print.rip",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"author": "Steve Shreeve <steve.shreeve@gmail.com>",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"rip-lang": "^3.
|
|
32
|
+
"rip-lang": "^3.8.9",
|
|
33
33
|
"highlight.js": "^11.11.1"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|