@rip-lang/swarm 1.0.2 → 1.0.3
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 +1 -1
- package/swarm.rip +7 -2
package/package.json
CHANGED
package/swarm.rip
CHANGED
|
@@ -200,12 +200,17 @@ export swarm = (opts = {}) ->
|
|
|
200
200
|
workerPath = join(dirname(new URL(import.meta.url).pathname), 'lib', 'worker.mjs')
|
|
201
201
|
scriptPath = resolve(process.argv[1] or '')
|
|
202
202
|
|
|
203
|
-
# find rip-loader for workers
|
|
203
|
+
# find rip-loader for workers (check local, then global)
|
|
204
204
|
loaderPath = null
|
|
205
205
|
try
|
|
206
206
|
loaderPath = join(dirname(require.resolve('rip-lang')), '..', 'rip-loader.js')
|
|
207
207
|
catch
|
|
208
|
-
|
|
208
|
+
# fall back to global install
|
|
209
|
+
try
|
|
210
|
+
globalDir = join(process.env.HOME or '', '.bun', 'install', 'global', 'node_modules', 'rip-lang')
|
|
211
|
+
loaderPath = join(globalDir, 'rip-loader.js') if existsSync(join(globalDir, 'rip-loader.js'))
|
|
212
|
+
catch
|
|
213
|
+
null
|
|
209
214
|
|
|
210
215
|
# state
|
|
211
216
|
live = 0
|