mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2026-10-30 03:56:24 -04:00
index.js: read package.json as string
This commit is contained in:
1 parent
dda16b264d
commit
17735c5e83
1 file changed
+1
-1
+1
-1
@@ -6,7 +6,7 @@ import BinWrapper from '@xhmikosr/bin-wrapper';
|
||||
import { packageConfig } from 'pkg-conf';
|
||||
|
||||
const pkg = new URL('../package.json', import.meta.url);
|
||||
const { hugoVersion } = JSON.parse(await fs.readFile(pkg));
|
||||
const { hugoVersion } = JSON.parse(await fs.readFile(pkg, 'utf8'));
|
||||
|
||||
const destDir = path.join(fileURLToPath(new URL('../vendor/', import.meta.url)));
|
||||
const binName = process.platform === 'win32' ? 'hugo.exe' : 'hugo';
|
||||
|
||||
Reference in new issue
Block a user