Skip to content

Commit

Permalink
Correctly referencing __dirname so thats compatible with windows (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmammino authored Jan 25, 2023
1 parent 7764c07 commit 1ea2cbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env node

import { fileURLToPath } from 'node:url'
import { join } from 'node:path'
import { fork } from 'node:child_process'
import { readFile } from 'node:fs/promises'
import variationsStream from 'variations-stream'

const __dirname = new URL('.', import.meta.url).pathname
const __dirname = fileURLToPath(new URL('.', import.meta.url))
const pkg = JSON.parse(await readFile(new URL('./package.json', import.meta.url)))
const defaultAlphabet =
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
Expand Down

0 comments on commit 1ea2cbb

Please sign in to comment.