Skip to content

Commit

Permalink
don't use npm to generate qr codes
Browse files Browse the repository at this point in the history
  • Loading branch information
dphiffer committed Sep 13, 2023
1 parent 07be93f commit 0e9a3c1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion wp-content/themes/mediasanctuary/lib/qrcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function qr_code_url($id) {
// Okay, let's make a QR Code!
$dir = dirname(__DIR__);
$filename = tempnam('/tmp', 'qrcode');
exec("cd $dir && npm run qrcode -- --output $filename $permalink", $output, $return_code);
exec("$dir/node_modules/qrcode/bin/qrcode --width 980 --output $filename $permalink", $output, $return_code);

// Something went wrong generating the QR Code
if ($return_code !== 0) {
Expand Down
1 change: 0 additions & 1 deletion wp-content/themes/mediasanctuary/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"description": "WordPress theme for mediasanctuary.org",
"main": "index.php",
"scripts": {
"qrcode": "qrcode --width 980",
"build-task:build": "sass css/main.scss:dist/main.css contribute/contribute.scss:dist/contribute.css css/admin/admin.scss:dist/admin.css",
"build-task:autoprefixer": "postcss dist/*.css --use autoprefixer -d dist",
"sass:build": "npm-run-all build-task:*",
Expand Down

0 comments on commit 0e9a3c1

Please sign in to comment.