@rip-lang/print 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/print.rip +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rip-lang/print",
3
- "version": "0.1.0",
3
+ "version": "0.1.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",
package/print.rip CHANGED
@@ -270,7 +270,8 @@ for section, i in sections
270
270
 
271
271
  # Read highlight.js CSS theme
272
272
  hljsTheme = if dark then 'github-dark' else 'github'
273
- hljsDir = join import.meta.dir, 'node_modules', 'highlight.js', 'styles'
273
+ hljsMain = import.meta.resolve 'highlight.js'
274
+ hljsDir = join hljsMain.replace('file://', '').replace(/\/[^/]+$/, ''), '..', 'styles'
274
275
  hljsCss = readFileSync join(hljsDir, "#{hljsTheme}.css"), 'utf-8'
275
276
 
276
277
  html = """