Skip to content

Commit

Permalink
fixed electron-rebuild in postinstallation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Hirschberger committed Nov 22, 2022
1 parent 2c5b1a3 commit e229a98
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ The example directory contains some implementations i use for my arduino boards
In newer release also support for profiles has been included. You can add an profiles string to each notification. This makes it possible to use the same sensors for different purposes in different profiles. (i.e. use the APDS-9960 either to control the MMM-Spotify module and in a different page to control i.e. a radio plugin or something totally different).

## Installation

The postinstallation step takes some time. Please wait for it to finish!

```sh
cd ~/MagicMirror/modules
git clone https://github.com/Tom-Hirschberger/MMM-Serial-Notifications.git
Expand Down
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"name": "MMM-Serial-Notifications",
"version": "0.0.6",
"version": "0.0.7",
"description": "",
"main": "MMM-Serial-Notifications.js",
"devDependencies": {},
"scripts": {
"postinstall": "node_modules/.bin/MagicMirror-rebuild"
"postinstall": "./postinstall"
},
"dependencies": {
"serialport": "latest",
"magicmirror-rebuild": "latest"
"serialport": "latest"
},
"repository": {
"type": "git",
Expand Down
8 changes: 8 additions & 0 deletions postinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if [ ! -f ../../node_modules/.bin/electron-rebuild ]; then
cd ../..
npm install electron-rebuild >/dev/null 2>&1
cd -
fi
../../node_modules/.bin/electron-rebuild

0 comments on commit e229a98

Please sign in to comment.